dbTalk Databases Forums  

DTS lookup Script

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


Discuss DTS lookup Script in the microsoft.public.sqlserver.dts forum.



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

Default DTS lookup Script - 05-18-2006 , 09:42 PM






I am new to DTS packages.
I have to extract data from SQL Server Database and store it in CSV
files.
In addition to that I need to extract a few columns as Lookup Data from
the Oracle Database also to the same CSV file.

Is this possible to have Lookup from a different Source Database?

Awaiting reply

RJ


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

Default Re: DTS lookup Script - 05-18-2006 , 10:11 PM






Hello oichi,


You can certainly do what you want yes. You can use a linked server from
SQL Server to Oracle and perform the Lookup/Join in a query and dump to CSV.

There are other ways also


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I am new to DTS packages.
I have to extract data from SQL Server Database and store it in CSV
files.
In addition to that I need to extract a few columns as Lookup Data
from
the Oracle Database also to the same CSV file.
Is this possible to have Lookup from a different Source Database?

Awaiting reply

RJ




Reply With Quote
  #3  
Old   
oichi
 
Posts: n/a

Default Re: DTS lookup Script - 05-19-2006 , 01:04 AM



Thanx for the reply Allan.

I was able to perform Lookup and get values from Oracle Db.

But there's a small problem

When my Lookup Query Looks like this, it runs successfully.

Select SZNETWORK ( SZNETWORK is CHAR )
Quote:
From X_NETWORK
Where SZNETWORK = ? ( ? is VARCHAR from SQL SERVER)

But I want to add a 'Like'

So when my Query looks like this

Select SZNETWORK
Quote:
From X_NETWORK
Where (SZNETWORK LIKE '%'+?)

It fails.

Would appreciate ur help.

Thanx
oichi



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

Default Re: DTS lookup Script - 05-19-2006 , 04:45 AM



Hello oichi,


OK. That is probably because the design time is not too stable with params
and complex statements.

Try redoing it like this

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


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Thanx for the reply Allan.

I was able to perform Lookup and get values from Oracle Db.

But there's a small problem

When my Lookup Query Looks like this, it runs successfully.

Select SZNETWORK ( SZNETWORK is CHAR )

From X_NETWORK

Where SZNETWORK = ? ( ? is VARCHAR from SQL SERVER)

But I want to add a 'Like'

So when my Query looks like this

Select SZNETWORK

From X_NETWORK

Where (SZNETWORK LIKE '%'+?)

It fails.

Would appreciate ur help.

Thanx
oichi



Reply With Quote
  #5  
Old   
oichi
 
Posts: n/a

Default Re: DTS lookup Script - 05-22-2006 , 11:50 AM



Thanx Allan.

That was a great help

I appreciate ur help.

Oichi


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.