dbTalk Databases Forums  

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

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss for the love of all things holy (and appending a parameter to an Oracle query) in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sundanceca
 
Posts: n/a

Default for the love of all things holy (and appending a parameter to an Oracle query) - 08-19-2005 , 05:24 PM






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


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: for the love of all things holy (and appending a parameter to an Oracle query) - 08-19-2005 , 05:36 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)


"sundanceca" <swalker (AT) ainet (DOT) com> wrote

Quote:
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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.