I have a query that is generating further queries, things like this:
select 'exec uspd_thing "'||name||'"'
from sometable
Which produces this :
exec uspd_thing "name1"
exec uspd_thing "name2"
But isql requires a 'go' statement after each statement.
There is an option to change the command terminator (-c) but the new terminator still needs to appear on the same line.
Any suggestions/tips on how to do this kind of thing… I guess I could post-process the results to add the 'go' lines…
Thanks,
Chris
Best Answer
AFAIK ISQL doesn't always need a go (or a ";", which will equally serve as a terminator. T-SQL commands may be allocated on consecutive lines without separator, the parser will handle that.
R. Pods