Viewing 15 posts - 316 through 330 (of 335 total)
You might also want to use BCP instead. BCP can now have a query specified instead of a table name for source and can then output in tab delimited format.
Also,...
September 21, 2004 at 2:51 pm
inserted/updated tables are just views of the log. when you want to update the value in the record, update against the real table name joining to "inserted" to identify which...
September 21, 2004 at 2:44 pm
and if you're worried about any raiserrors going to the client you can use the old fashioned ugly DOS means:
declare @err int
exec @err = master..xp_cmdshell 'osql -Smyserver -Usa -Pgod -Q"set...
September 9, 2004 at 1:26 pm
Actually, that is a myth, however, the closer the keyword is to the start of the line (fewer indents/spaces), the sooner it will get executed by the processor. The same is...
September 1, 2004 at 2:49 pm
one more time rocky:
CASE WHEN colname = "X" THEN "Yes" ELSE "No" END as newcolname
BTW: do you have infinite jest and excellent fancee?
August 31, 2004 at 3:53 pm
check out the case statement
CASE
August 31, 2004 at 3:51 pm
As I recall the cast is going to bypass any indexing for that column anyway so why not use a case?
AND case when isnumeric(code) = 1 then cast(code as int)...
August 31, 2004 at 12:59 pm
Last time I checked, what enterprise manager does with fundamental modifications like this is rename the table create new table and copy the records back in then drop the old. ...
August 31, 2004 at 12:41 pm
Simplify:
select a.itemid, a.attributename, a.value
from @fulltable a
LEFT OUTER JOIN @subtable b ON a.attributename = b.attributename
where b.attributename is null
OR a.value = b.value
August 30, 2004 at 12:32 pm
Back in the old days when we used stone knives and bear skins we didn't have these fancy schmancy text editors ad IDE's that color coded syntax.
The programmer actually had...
August 30, 2004 at 12:05 pm
You need to wrap a begin and end around the "then" part of the if statement and put the goto after the rollback . However, the safest method of nesting...
August 25, 2004 at 12:33 pm
Here's a crude function I use alot. (Posted as a script contribution this AM):
E.G. select dbo.string_field( namecolumn, ' ', 1 ) AS first_name, dbo.string_field( namecolumn, ' ', 2 ) AS middle_name,...
Use...
August 25, 2004 at 12:23 pm
Use cowboyferrier's method, and write it as a UDF (assuming you're on 2000).
Then in a select you can say:
SELECT name, dbo.myUDF_get_val_list( primarykeyhere ) AS val_list FROM tablename...
Then this can be...
August 25, 2004 at 12:17 pm
The fact that microsoft offers clustered indexes (and performance/tuning tips and tricks, etc. to make use of these) belies your statement.
Hey, I used to teach the courses which provided...
March 11, 2004 at 4:08 pm
Well this is what the microsoft ratbastards passing themselves off as product developers excel at: changing fundamental functionality from version to version and causing people to have to go back...
March 11, 2004 at 12:43 pm
Viewing 15 posts - 316 through 330 (of 335 total)