November 7, 2006 at 6:43 am
Yes, I do generate the code and then cut & paste into another window to execute...
The sql code using the REPLACE statement worked for what I need to do...
Thanks a lot for all of your assistance.
...Michelle
November 7, 2006 at 6:51 am
Is this a one time deal or permanant maintenance of the DB?
November 7, 2006 at 7:30 am
Ummm.... why don't you just store it in a variable and execute it using EXEC or sp_ExecuteSQL ???
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2006 at 7:32 am
... or use Xp_ExecResultSet (works only for 2000, not for 2005).
November 7, 2006 at 8:19 am
Once you appreciate that end-of-line is no more significant in T-SQL than space or tab, using multiline string literals will seem a lot clearer than concatenating char(13) everywhere. The color-coding tells you it's all one string, the fact that it's on two lines tells you there is a line break. You don't even have to worry about whether it should be char(13) or char(13) + char(10).
I know it's hard to believe, and I'm old enough to find it bewildering myself, but you do occasionally run into programmers who don't have "carriage return = char(13)" embedded in their DNA. I hate having to explain it.
Viewing 5 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply