all groups > sql server dts > august 2005 >
You're in the

sql server dts

group:

for the love of all things holy (and appending a parameter to an Oracle query)


for the love of all things holy (and appending a parameter to an Oracle query) sundanceca
8/19/2005 3:24:27 PM
sql server dts:
Well, certainly I'm the stupidest human being on the face of the earth.
And, alas, there is no booby prize for this honor.

All I want/need to do is copy some data from an Oracle db (7.3.4) to a
Sql Server instance (2000 sp3) where said data is > #this date#... I
want to select the max(date) from the destination table in sql, then
query the oracle table, filtering the results based on that sql date. I
want to automate this in dts. Why, in the name of all things holy is
this so difficult? Why am I the stupidest human being on the planet
earth? I thought the guy who climbed the electric pole, then scaled
down the power line to get his kite was the stupidest, but no, it's me.
It sucks to be me.

Help. Please.

SW
Re: for the love of all things holy (and appending a parameter to an Oracle query) Allan Mitchell
8/19/2005 11:36:14 PM
Try this

Read the MAX(DATE) into a Global Variable using an ExecuteSQL task.

Now use this in the SourceSQLStatement of the data pump task that takes the
data from Oracle to SQL Server. You can use (if Oracle supports) the ?
place holder in your query and map the Global variable to the ?. If Oracle
does not support ? then have a look here

Global Variables and SQL statements in DTS
(http://www.sqldts.com/default.aspx?205)


[quoted text, click to view]

AddThis Social Bookmark Button