Viewing 15 posts - 181 through 195 (of 429 total)
use the -i flag.
if you are using 2005, better to use sqlcmd instead of osql. osql is deprecated.
July 26, 2007 at 8:08 am
agreed. wasn't thinking of that case.
usually what you see is the TOP 100 PERCENT hack which is totally indefensible.
July 19, 2007 at 10:48 am
you can also use bcp.exe with the queryout option, which would be my preferred method.
July 18, 2007 at 10:03 pm
ORDER BY should never be in a view definition.
a view returns a set, and a sets are unordered.
if you want the result to be ordered, put ORDER BY...
July 18, 2007 at 9:59 pm
yes, it is truly amazing what geeks can get so worked up about.
I tried to explain those hot feelings around banker's rounding to my wife, and was met with...
July 7, 2007 at 10:53 pm
there's one other option here but I've never tried it - apparently you can export directly from SQL to Excel using OPENROWSET:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
July 3, 2007 at 3:53 pm
any technology can be misused.
that's not a reason not to use it. just be careful not to misuse it.
July 3, 2007 at 10:50 am
that works for importing data.
for exporting data, you have to use BCP or SSIS.
July 3, 2007 at 10:28 am
I prefer to store files on the filesystem, and just the location of the file in sql server.
July 2, 2007 at 6:06 pm
beware that the DDL will be split across multiple rows in syscomments if the proc is more than 4000 chars.
July 2, 2007 at 6:05 pm
this is very dangerous from a security perspective. anyone with perms to execute this proc can wreak all sorts of havoc.
you might want to read this: http://www.sommarskog.se/dynamic_sql.html
July 2, 2007 at 6:03 pm
The alternative to a cursor in tsql is to use a set based method to get the work done. It's not always possible, but usually is.
Other alternatives are to use...
July 2, 2007 at 5:57 pm
no worries, I'm not insulted at all!
and yes you did answer it, thanks.
June 19, 2007 at 9:21 am
Viewing 15 posts - 181 through 195 (of 429 total)