"Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
news:u5lpB3afFHA.2472@TK2MSFTNGP15.phx.gbl...
> You can't do it like this
>
> You will need to build up your statement then if you want to use IN
>
> Here is an article theat will get you cooking
>
> Global Variables and SQL statements in DTS
> (
http://www.sqldts.com/default.aspx?205)
>
> --
>
>
>
> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
>
www.SQLDTS.com - The site for all your DTS needs.
>
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
>
www.konesans.com - Consultancy from the people who know
>
>
> "Frank Mayer" <frankmayer@gmx.de> wrote in message
> news:da0p9i$9nk$1@news.mch.sbs.de...
> > Thnx.
> > I did as you described, but I have now the problem that my Table
contains
> > more than one value.
> > What do I have to do with:
> >
> > SELECT.... WHERE col IN ?
> >
> > It reports Access Violation...
> >
> > "Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
> > news:u5peVEPfFHA.1148@TK2MSFTNGP12.phx.gbl...
> >> A number of ways really but here is my preferred way
> >>
> >> Use an ExecuteSQL task to get those filter values and put them into
> >> Global
> >> Variables.
> >>
> >> With those variables if your source provider accepts it you can now use
> > the
> >> values in the SourceSQL Statement property of the datapump task by
using
> >> this method
> >>
> >> 1. Use ? as a placeholder in the statement (select ... FROM ... WHERE
> >> col
> > =
> >> ?) and using the parameters button map onto the ? , a global variable
> >>
> >> If not then you can still do this
> >>
> >> 1. Use an active Script task to dynamically build the
> >> SourceSQLStatement.
> >>
> >> Global Variables and SQL statements in DTS
> >> (
http://www.sqldts.com/default.aspx?205)
> >>
> >> --
> >>
> >>
> >>
> >> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> >>
www.SQLDTS.com - The site for all your DTS needs.
> >>
www.SQLIS.com - You thought DTS was good. here we show you the new
> >> stuff.
> >>
www.konesans.com - Consultancy from the people who know
> >>
> >>
> >> <muc80339@mnet-online.de> wrote in message
> >> news:d9v22s$98l$1@svr7.m-online.net...
> >> > Hello,
> >> > i want to get data from a table, but only the data that is specified
> >> > (dynamically) with a filter that is stored in a local table.
> >> >
> >> > SQL-Statement
> >> > SELECT * FROM external_table1
> >> > INNER JOIN internal_table2 ON table1.datafield1 = table2.datafield2
> >> >
> >> > How do I get this in my dts-package if i only can have one reference
to
> >> > external_table1?
> >> >
> >> > Thankx.
> >> >
> >> > Frank
> >> >
> >>
> >>
> >
> >
>
>