Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SQL Task to build tqsl of more than 8000 characters

$
0
0

Folks, I've read blog after blog after post after post about how to get a variable to store more than 8000 characters, but I can't figure out the "shred" stuff, and I'm not sure I need to? I have a tsql script, that runs on one server to create another tsql script. That resulting tsql script is then run on a different server to accomplish what I need. The problem is, the resulting tsql script is way more than 8000 characters, it's about 12000. It's a series of commands, which I thought I could execute one at a time, but I can't switch connections from source to destination server in between, that I know of. Or can I ? The sql task only permits me to provide one connection, so I assume no? It would be great to be able to generate the "one line command" from my destination, then execute it on a different server if possible. Then perhaps, rather than having line after line of commands, I could do one at a time and circumvent the need for > 8000 characters.

The first execute sql task, actually runs a stored procedure that loops until all the commands are built.

So, I either need to figure out how to switch connections mid-stream, or get the >8000 characters into a variable to be executed against a different server later. Would it matter if instead of getting result set "single row", I mapped to an output variable instead during the generation of the script?

Any help?

mpleaf



Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>