dbTalk Databases Forums  

DTS subset of records from Oracle table

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


Discuss DTS subset of records from Oracle table in the microsoft.public.sqlserver.dts forum.



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

Default DTS subset of records from Oracle table - 02-18-2004 , 03:21 PM






I would like to DTS those records in a particular Oracle table into a SQL table that were created after a certain date time value, which will be extracted from a table in the SQL database

The DTS script looks something lik

SELECT
INTO analyst.Log_Event
FROM "ORA"."Log_Events

What I want to do is add a where clause, something like

WHERE "ORA"."Log_Events".EventTime > (SELECT Max(EventTime) FROM analyst.Log_Events

but I cannot seem to figure out the correct syntax. Any help would be greatly appreciated!

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

Default Re: DTS subset of records from Oracle table - 02-19-2004 , 02:21 AM






I can see a couple of possible ways

1. Linked server from SQL Server to Oracle. You can then use the Oracle
instance rather like it was local.
2. If using SQL Server 2000 you could
a) Grab the Date value from SQL Server and read into a Global Variable
in an ExecuteSQL task
b) In the Source for the DataPump from Oracle to SQL Server use the
Global Variable (?)

so something like

SELECT <col list> FROM "ORA"."Log_Events"

WHERE EventTime > ?

You should then be able to map your Global Variable to the ? placeholder.

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Dale Fye" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I would like to DTS those records in a particular Oracle table into a SQL
table that were created after a certain date time value, which will be
extracted from a table in the SQL database.
Quote:
The DTS script looks something like

SELECT *
INTO analyst.Log_Events
FROM "ORA"."Log_Events"

What I want to do is add a where clause, something like:

WHERE "ORA"."Log_Events".EventTime > (SELECT Max(EventTime) FROM
analyst.Log_Events)

but I cannot seem to figure out the correct syntax. Any help would be
greatly appreciated!




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.