![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, I would like to convert RecordSet to comma separated values in my SSIS 2005 package. I populate a recordset usinq a SQL task: (select distinct User_id from [User_ID]) to variable User_ID (System.Object) Then, I'd like to run a Data Flow Task with a query that would filter its result by the values stored in variable User_ID. So, it would look like 'select ..... where user_id in (User_IDs from the variable)' What would be the best way to achieve it? I know how to display each value separately using Script Task and ForEach Loop container, but not sure how to list them all separated by comma. -- Thanks, Pasha |
#3
| |||
| |||
|
|
Hi All, I would like to convert RecordSet to comma separated values in my SSIS 2005 package. I populate a recordset usinq a SQL task: (select distinct User_id from [User_ID]) to variable User_ID (System.Object) Then, I'd like to run a Data Flow Task with a query that would filter its result by the values stored in variable User_ID. So, it would look like 'select ..... where user_id in (User_IDs from the variable)' What would be the best way to achieve it? I know how to display each value separately using Script Task and ForEach Loop container, but not sure how to list them all separated by comma. -- Thanks, Pasha |
#4
| |||
| |||
|
|
Hi All, I would like to convert RecordSet to comma separated values in my SSIS 2005 package. I populate a recordset usinq a SQL task: (select distinct User_id from [User_ID]) to variable User_ID (System.Object) Then, I'd like to run a Data Flow Task with a query that would filter its result by the values stored in variable User_ID. So, it would look like 'select ..... where user_id in (User_IDs from the variable)' What would be the best way to achieve it? I know how to display each value separately using Script Task and ForEach Loop container, but not sure how to list them all separated by comma. -- Thanks, Pasha |
#5
| |||
| |||
|
|
Hi All, I would like to convert RecordSet to comma separated values in my SSIS 2005 package. I populate a recordset usinq a SQL task: (select distinct User_id from [User_ID]) to variable User_ID (System.Object) Then, I'd like to run a Data Flow Task with a query that would filter its result by the values stored in variable User_ID. So, it would look like 'select ..... where user_id in (User_IDs from the variable)' What would be the best way to achieve it? I know how to display each value separately using Script Task and ForEach Loop container, but not sure how to list them all separated by comma. -- Thanks, Pasha |
#6
| |||
| |||
|
|
Hi All, I would like to convert RecordSet to comma separated values in my SSIS 2005 package. I populate a recordset usinq a SQL task: (select distinct User_id from [User_ID]) to variable User_ID (System.Object) Then, I'd like to run a Data Flow Task with a query that would filter its result by the values stored in variable User_ID. So, it would look like 'select ..... where user_id in (User_IDs from the variable)' What would be the best way to achieve it? I know how to display each value separately using Script Task and ForEach Loop container, but not sure how to list them all separated by comma. -- Thanks, Pasha |
#7
| |||
| |||
|
|
Hi All, I would like to convert RecordSet to comma separated values in my SSIS 2005 package. I populate a recordset usinq a SQL task: (select distinct User_id from [User_ID]) to variable User_ID (System.Object) Then, I'd like to run a Data Flow Task with a query that would filter its result by the values stored in variable User_ID. So, it would look like 'select ..... where user_id in (User_IDs from the variable)' What would be the best way to achieve it? I know how to display each value separately using Script Task and ForEach Loop container, but not sure how to list them all separated by comma. -- Thanks, Pasha |
#8
| |||
| |||
|
|
Hi All, I would like to convert RecordSet to comma separated values in my SSIS 2005 package. I populate a recordset usinq a SQL task: (select distinct User_id from [User_ID]) to variable User_ID (System.Object) Then, I'd like to run a Data Flow Task with a query that would filter its result by the values stored in variable User_ID. So, it would look like 'select ..... where user_id in (User_IDs from the variable)' What would be the best way to achieve it? I know how to display each value separately using Script Task and ForEach Loop container, but not sure how to list them all separated by comma. -- Thanks, Pasha |
#9
| |||
| |||
|
|
Hi All, I would like to convert RecordSet to comma separated values in my SSIS 2005 package. I populate a recordset usinq a SQL task: (select distinct User_id from [User_ID]) to variable User_ID (System.Object) Then, I'd like to run a Data Flow Task with a query that would filter its result by the values stored in variable User_ID. So, it would look like 'select ..... where user_id in (User_IDs from the variable)' What would be the best way to achieve it? I know how to display each value separately using Script Task and ForEach Loop container, but not sure how to list them all separated by comma. -- Thanks, Pasha |
#10
| |||
| |||
|
|
Hello Pasha: Seems to me there may be a better way then a System.Object type variable. If your User_ID list can be gleaned from a SQL table, then why not use it in a lookup in the data flow? Create a Lookup Transform on the pipe line and use your SELECT DISTINCT query to lookup valid User_ID's. You will have to play around with the Error Output settings to get the results you want. Another way is to use a Merge Join transform, which may or may not give better performance based on the number of records it is dealing with. HTH -- Todd C [If this response was helpful, please indicate by clicking the appropriate answer at the bottom] "Pasha" wrote: Hi All, I would like to convert RecordSet to comma separated values in my SSIS 2005 package. I populate a recordset usinq a SQL task: (select distinct User_id from [User_ID]) to variable User_ID (System.Object) Then, I'd like to run a Data Flow Task with a query that would filter its result by the values stored in variable User_ID. So, it would look like 'select ..... where user_id in (User_IDs from the variable)' What would be the best way to achieve it? I know how to display each value separately using Script Task and ForEach Loop container, but not sure how to list them all separated by comma. -- Thanks, Pasha |
![]() |
| Thread Tools | |
| Display Modes | |
| |