Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008
all groups > sql server programming > august 2005 > threads for sunday august 21

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

How do I fire a sql statement from being seen by a trace session
Posted by Exonet Developer at 8/21/2005 11:50:04 PM
Hi I am trying to do an OPENROWSET call to an ODBC driver which needs a key to work but i need to keep the KEY hidden from being seen/ traced. Is there a way to execute an sql statement and disable a tracing session or another way stop a OPENROWSET argument from being traced and duplicated...more >>


Saving Time in 12 hour format
Posted by Sudhakara.T.P. at 8/21/2005 11:24:01 PM
Hi, By default in SQL Server, when I store a time in an Datetime field, it stores in 24 hour format. but I want to store in 12 hours format with AM/PM also being stored. Can anyone help me in this. Thanks & Regards Sudhakara.T.P....more >>

Using Insert Into but avoiding duplicates
Posted by John at 8/21/2005 10:39:01 PM
Hi all, I have a sp which uses the "Insert Into" statement and fromone table to another. The problem is that I want to avoid duplicates in the destination table. The unique key consists of 3 columns. Could someone please provide me a short example and explanation on how I do this as I'm stu...more >>

Copy table record as new record
Posted by Tim M at 8/21/2005 10:01:03 PM
Hi I want to create a copy of an existing record in the same table, except with a different primary key value of course. This is pretty easy if you specify each in turn like: INSERT INTO TableA ( Col1 Col2 ..... ) SELECT Col1, Col2, ... FROM TableA WHERE PK = @RecordtoCopy Howe...more >>

Cursor performance slows exponentially
Posted by mrpubnight NO[at]SPAM hotmail.com at 8/21/2005 7:40:27 PM
I have a strange problem. I am running a process that unfortunately requires that I analyze each record of a table which has [currently] led me to using a cursor. I noticed some performance problems and so I ran some tests and it seems that the cursor performance is getting exponentially slow...more >>

How to optimize the following update sql?
Posted by nick at 8/21/2005 7:30:06 PM
I have two very big tables, say t20M and t10M, have 20 million rows and 10 million rows respectively. I need update some columns in t20M: set rowcount 10000 while 1=1 begin update t20M set n.c0 = t10M.c0 from t20M inner join t10M on ....(join clause)... where t20M.c1 not in (selec...more >>

Naming Convention: Parent-Child tables
Posted by Greg at 8/21/2005 5:00:24 PM
Hi, I'm trying to figure out a good naming convention for Parent-Child tables. For instance: UserAccntCancel being the main table in this example, which has 2 fields Reason and Detail (Detail being the child of Reason). Is the below naming correct? I find it long, I would also like to hav...more >>

SUM
Posted by Frank Dulk at 8/21/2005 2:10:22 PM
sqlrel = "Select recpdv.rpdtcaixa,recpdv.rpvrsdoant,recpdv.rpvrdia,recpdv.rpvrsaida,recpdv.rp sdoatual,cxempresas.empsigla, recpdv.rpvrsaidat, recpdv.rpvrsaidacci," & _ "(select sum(valor) from cxrecpdvaux where rpcodi = recpdv.rpcodi and bancod = '409' ) as vrs409, " & _ "(select sum(valor) fr...more >>



Select Max error
Posted by gavin at 8/21/2005 12:43:03 PM
Query is to find row containing max date Query worked in ACCESS but fails in SQL SELECT * FROM PatientStatusLab WHERE PatientStatusLabID=(SELECT MAX(PatientStatusLabID) FROM PatientStatusLab WHERE MasterPatientID=?) AND MasterPatientID = ? Get error: [Microsoft][ODBC SQL Server Driver]COU...more >>

faking modules
Posted by nposter at 8/21/2005 12:14:33 PM
We have a pretty large code base of stored procedures ( 700 ), functions ( 300 ) , and views ( 200 ) at our medium-sized company. Why someone would implement the majority of their business logic in transact-sql , I don't know, but we are way beyond the point of being able prevent that from happe...more >>

Call a stored procedure from another stored procedure
Posted by et at 8/21/2005 10:58:14 AM
How do I call a stored procedure from a stored procedure, returning a value? With Getvalue being the name of the stored procedure, I've tried: Set @value = (getvalue(p1, p2)) Set @value = exec getvalue(p1, p2) and various other syntax all keep getting "getvalue is not a function" Thank...more >>

ERWIN
Posted by PJ6 at 8/21/2005 10:54:36 AM
I'm working with a developer that used ERWIN to create the database I have to interface with. At first glance I noticed that there are a ton of unecessary triggers, many of which look like they won't even be hit because they're trying to detect and raise error messages for FK violations (when ...more >>


DevelopmentNow Blog