August 17, 2007 at 12:59 pm
Hi,
I am trying to populate table names matching a pattern into a rowset global variable using query in "exec sql task" . this package has only a sql connection and exec sql task. When I save this package, I get a type mismatch error. Does anybody have an idea as to what I should do to avoid this error.
thanks
August 20, 2007 at 3:44 pm
To save an entire result set of a SELECT statement into a global variable using the Execute SQL task
SELECT *FROM titleauthor
This procedure assigns all records returned from the SELECT statement to be stored in the Authors global variable.
August 21, 2007 at 2:18 am
Stuart,
The following script opens a GV rowset and builds a comma-separated string for each row. You could incorporate the FileSystemObject in to the record loop and write each line to a CSV file, will that do?
Set oRS = DTSGlobalVariables("myGVrowset").Value
oRS.MoveFirst
For j =1 to oRs.RecordCount
For i = 0 to oRS.Fields.Count -1
If oRS.Fields(6).Value = "" Then Exit For
fieldList = fieldList & oRS.Fields(i).Value & ", "
If i = oRS.Fields.Count -1 Then fieldList = fieldList & vbcrlf
Next
oRS.MoveNext
Next
December 16, 2008 at 6:14 pm
Hi Adrian,
Just a query regarding your above script. Are you aware as to any memory restrictions for Rowset global variables?
I am working on a package which uses 6 GV's that receive output in the form of Rowsets and I am not sure, but I think it is falling over when memory becomes full. I have been testing with smaller rowsets (using TOP 10, 100, 500) and that works fine, but trying TOP 1000 it seems to fall over.
Cheers,
James
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply