spu_generateInsert - PRINT statement limitation worked around
Further to my earlier update today I've reworked the printing out of the insert statements - mainly because I need it for the work I'm doing today...
It now produces a single statement per row of data, and then checks the DATALENGTH of that statement. If it exceeds the 8000 byte limit, then it looks for CHAR(10)/CHAR(13) characters and breaks the row into chunks based on these CHAR(10)/CHAR(13) limits. This relies on the fact thatPRINT 'Hello ' + CHAR(13) + 'World'
and
PRINT 'Hello'
PRINT 'World'
both produce the same output of
Hello
WorldSo, instead of PRINTing CHAR(13) we're PRINTing multiple lines.All of which seems to work and I can finally get the As per usual, download the spu_generateInsert script here.