![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
-----Original Message----- Try a different approach Build the statement in an Active Script task and assign to the DDQ. set the SourceSQLStatement of the DDQ to "SELECT <col list> FROM table WHERE <col> IN " & DTSGlobalVariables("ArrayOfVals").Value What you are proposing initiallly would not work in TSQL either declare @a varchar(50) set @a = '(''123'',''1124'')' select * from authors where au_id in @a --This would work though declare @a varchar(100), @WholeString varchar(200) set NOCOUNT On set @a = '(''123'',''1124'')' set @WholeString = 'SELECT * FROM Authors WHERE au_id IN ' + @a Exec(@WholeString) -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org . |
![]() |
| Thread Tools | |
| Display Modes | |
| |