|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 1:35 AM
Points: 734,
Visits: 636
|
|
It would be possible to do this as a set based operations if you built an sp on the fly and then executed it.
Nuke the site from orbit, its the only way to be sure...
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 4:05 AM
Points: 199,
Visits: 498
|
|
ron.mcdowell,
I've set @Cmd to NVARCHAR(MAX), the limitations of sp_executesql are only that of server memory or 2GB.
The number of rows is irrelevant as the @Cmd value only has the column list and makeup for extracting the column values. E.g.
SELECT 'INSERT INTO dbo.MyTable (Col1, Col2, Col3) VALUES (' + Col1+ ', ' + Col2 + ', ' + Col3 + ')' FROM dbo.MyTable
Providing this fits into @Cmd there is no limitation, the actual values are no set in @Cmd.
Hopefully that makes sense.
|
|
|
|