RE: Convert RecordSet to comma separated values



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
.



Relevant Pages

  • Re: Help please on Record sets
    ... I tried running it from the query builder after deleting all the ... Just because your "original SQL string was generated in a working ... I had to add a quote to your first Formated Date and Change the quotes to ... recordset or would that lead to more problems? ...
    (microsoft.public.access.modulesdaovba)
  • Re: Need help with Code Please!!!
    ... posted in response to my last post was some SQL, but this is not the SQL that ... the actual string that gets built at the end of the SQ1 build process. ... The message says Syntax error in query expression ... Dim rs As Recordset 'object ref to qryCompany\USFNumber ...
    (microsoft.public.access.formscoding)
  • Re: ASP - FROM statement slows down connection to database
    ... Open your database in Access, switch to the Queries tab, create a new query ... in Design View without choosing a table, swtich to SQL View, paste the sql ... connection string rather than using an ... recordset open statements. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Loading recordset at runtime
    ... difference in loading time for the entire recordset and the default 10 ... query or build the SQL string in VBA. ... Ah, ok, then use the forms "filter" option. ...
    (microsoft.public.access.forms)
  • Re: Loading recordset at runtime
    ... cases the recordset will be modified after the form is opened. ... Ah, ok, then use the forms "filter" option. ... my personal preference is to build the sql string in code and just ... advantages to using a query (the only exception here is if the "base" sql ...
    (microsoft.public.access.forms)