|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, May 23, 2013 3:57 AM
Points: 1,
Visits: 28
|
|
Hello, try this select (this pivots rows to one string row): select stuff((select top 10 ',"' + code + '"' from Products order by code for XML path('')), 1, 1, '');
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, April 09, 2013 11:55 AM
Points: 1,
Visits: 3
|
|
Hi. I have tried to following your example posted here verbatim, however, whenever I execute my package it fails on the Execute SQL Task within the Foreach loop. I get the following error "Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query ""SELECT '"+@[User::FileList]+","+@[User::MissingFi..." failed with the following error: "Incorrect syntax near '+'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Task failed: Execute SQL Task"
What should I look for that I may have overlooked earlier?
My variables name datatype value sql_str String "SELECT '"+@[User::FileList]+", "+@[User::MissingFileName]+'" as FileList" MissingFiles Object MissingFileName String FileList String
|
|
|
|