Re: Parameterised Query vs LookUps
- From: "Andy S." <andymcdba1@xxxxxxxxxxxxxxxxx>
- Date: Tue, 19 Jul 2005 11:31:19 -0400
You could create a global variable in the package to store the code for your
SELECT, then use a Dynamic Properties task to assign it to the Data
Transform task. Then you can build the SQL statement with an ActiveX
script.
http://www.sqldts.com has some good examples.
"Neil" <Neil@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1BEEE5D3-0F09-4009-99DB-1034F790D005@xxxxxxxxxxxxxxxx
> Hi,
>
> I have a Transform Data Tasks which I'm using to load data from an Oracle
> DB
> into a SQL Server DB. The data in Oracle is for all time periods but I
> want
> to filter for a specific day, this day is not known in advance but can be
> derived from a UDF in the SQL Server DB.
>
> Pseudo code
> Select * From OracleDB Where TransactionDate = Result of UDF
>
> What is the best way to achieve this?
>
> I cannot use the results of the UDF in the SQL Query because the
> connection
> being used is the Oracle one so it doesn't understand this. I have read
> that
> you can execute a look up against a diff connection and use this but i've
> been unable to get this to work.
>
> Essentially I need to execute this UDF to get my selected date and then
> use
> this in the where clause to filter.
>
> Thanks
> N
.
- Follow-Ups:
- Re: Parameterised Query vs LookUps
- From: Neil
- Re: Parameterised Query vs LookUps
- References:
- Parameterised Query vs LookUps
- From: Neil
- Parameterised Query vs LookUps
- Prev by Date: Run-Time error -2147221164 (80040154)
- Next by Date: Re: Parameterised Query vs LookUps
- Previous by thread: Parameterised Query vs LookUps
- Next by thread: Re: Parameterised Query vs LookUps
- Index(es):
Relevant Pages
|