Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-10-06 : 00:09:22
|
GurusIn sql task in DTS i can write a sql statement in one line,but if i want to take write that sql statement in multiple rows how will i do that?Like i can writeselect * from table where id=2now how wil i write thisselect * from tablewhere id=2Please helpregardsNitin |
|
Kristen
Test
22859 Posts |
Posted - 2006-10-06 : 00:33:47
|
It doesn't make any difference to SQL Server if the statement is on one, or many, lines. Why does it make a difference to you - readability perhaps?Kristen |
|
|
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-10-06 : 02:37:28
|
Hi kristenThanks for reply.Kristen i am talking baout writing sql statement in SQL Task in DTS.because if you write in multiple rows it wnt exec .RegardsNitin |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-10-06 : 03:33:42
|
Why not write it on one line then? Sorry, I must be missing something!Kristen |
|
|
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-10-06 : 04:46:16
|
Hi Kristenyes i know it can be written in one line but what if i want it to write it into multiple lines?RegardsNitin |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-10-06 : 04:55:29
|
quote: Originally posted by nitin1353 Hi Kristenyes i know it can be written in one line but what if i want it to write it into multiple lines?RegardsNitin
Which task in DTS you are talking about? Execute SQL task?It works with multi-line sql task fine. If you talking about ActiveX script task, you need to use _ (underscore) to connect multiple lines as follows:sFilename = DTSGlobalVariables("Folder").Value _ & sFilename & ".xls" Harsh AthalyeIndia."Nothing is Impossible" |
|
|
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-10-06 : 05:04:07
|
oops..thanks harsh..i was under the impression that it does not run in multiple lines.Thanks a tonRegardsNitin |
|
|
|
|
|