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 >>
Don't see what you're looking for? Search DevelopmentNow.com.
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 >>
|