![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 (AT) discussions (DOT) microsoft.com> wrote in message news:1BEEE5D3-0F09-4009-99DB-1034F790D005 (AT) microsoft (DOT) com... 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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |