dbTalk Databases Forums  

Re: Passing SQL Server Variables to Oracle in a 'Where' clause

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


Discuss Re: Passing SQL Server Variables to Oracle in a 'Where' clause in the microsoft.public.sqlserver.dts forum.



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

Default Re: Passing SQL Server Variables to Oracle in a 'Where' clause - 02-20-2004 , 12:47 AM






OK so you return a rowset from SQL Server and want to plug this in to a
WHERE val IN (<your variable>)

I would do this

Read the Values into a Global Variable Rowset
In An AX Script loop over it and concatenate the values into a string
Use the following article to build the SourceSQLStatement of the DataPump
task

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

--

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


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

Quote:
Could someone please assist me or direct me to a source that explains how
to pass values from a SQL Statement from SQL Server to Oracle in a 'Where'
clause without using Linked Server in SQL Server 2000 DTS?
Quote:
The datatype of the returned vlaues from SQL Server is an INT, which is
the same datatype in Oracle.

Since I am returning more than one value from SQL Server, the 'Where'
clause to Oracle would be using an 'IN' statement.

Any help would be greatly appreciated.

Thanks so much in advance.



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.