Groups | Blog | Home
all groups > sql server dts > july 2007 >

sql server dts : Setting dynamic date to an Oracle ODBC data source


RK
7/13/2007 7:36:01 AM
Hi Chaps,

I am developing a DTS package to import data from a remote Oracle database
into our SQl Server 2000 database. The connectivity to Oracle is fine and I
can browse all tables and preview them via the preview of a transformation
task. Instead of a Table/View in the Source tab page, I am using the SQl
query for getting my data source. The SQl query that I use is as follows:

Select * from SBS.I_gen_Led_Det Where igld_WCal_Prim_Dte = {d '2007-07-12'}

This works fine and gets me the required set of records from the Oracle
database which then allows me to populate the destination table in my SQl
Server 2000 database.

Now coming to the problem, I need to be able to make the {d '2007-07-12'} to
be dynamic and to be able to pass the date value via a global variable so
that I can make the DTS package dynamic.

I just cant seem to get this presumably simple thing to work probably
because of lack of conformance of the SQL syntax between the SQL server 2000
and Oracle/ODBC SQL etc.

Can anybody please point me in the right direction because I am unable to
schedule this package because of not being able to pass the date dynamically.

Rgds,

RK
RK
7/15/2007 10:28:01 PM
Hello again,

Incase someone was reading this and was guessing how, I just found the
solution. All I needed to do was to write an Activex script to dynamically
buld the SQL statement with the choice of parameter value pre-built in the
script itself and then assigning that statement as the source statement to my
data pump task.

Cheers
AddThis Social Bookmark Button