What part of it is going to be dynamic? The name of the DB?
OK so what I think you will need to do is this
The Transform Data task has as the Source a connection. For you to be able
to issue that Query as is you will need to have a reference (linked server)
between the two if the 2 DBs are on differing servers which I suspect they
are.
Now the cooler thing to do would be to retrieve the resultset from your
"SELECT DISTINCT customer FROM <localDB>" first and then make it into a
comma sep' list and then plug that into the statement. Yes this should be
doable.
ExecuteSQL task into a resultset.
ActiveScript task to read the resultset and make the comma sep' list
Same AX script task plug that into the statement for the DataPump task.
--
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals -
http://www.sqlpass.org [quoted text, click to view] "Dean" <noreply@fakeaddress.com> wrote in message
news:c6pl2b$8md$1@news01.intel.com...
> I need to create this Transform Data Task:
>
> SELECT ...
> FROM <TeradataDB>
> WHERE <TeradataDB>.customer IN (?)
>
> The parameter needs to be: SELECT DISTINCT customer FROM <localDB>
>
> The first problem is that the TeradataDB driver is ODBC, which does
support
> parameters. The second problem is that my parameter is going to be a
dynamic
> query from the localDB. I've read the article
>
http://www.sqldts.com/default.aspx?205 that talks about how to build a
> statement using global variable with an ActiveX Script Task. Can the
ActiveX
> Script Task also make a query to the local database? And then parse it
into
> a comma-delimited customer list?
>
> Thanks for any advice!
>
>
>
> --
> Disclaimer: This post is solely an individual opinion and does not speak
on
> behalf of any organization.
>
>