Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Query Depending on External File Contents

Status
Not open for further replies.

123FakeSt

IS-IT--Management
Aug 4, 2003
182
0
0
In SQL server 2000 I am pulling data from a Sybase database through DTS. I also have a text file with ~300 account numbers. These are the two connections on the DTS package.

I would like to only pull the data for those accounts. In other words "only pull the account data for the accounts listed on this text file". What would be the most effecient manner to achieve this? A lookup?

The early bird gets the worm, but the second mouse gets the cheese.
 
Has this been resolved, I have the same question?
 
Well I ended up with an ActiveX task that read the file through the file system object. Then it replaced the VbCrLf's with commas.

The transform data task custom SQL settings were created by the script inserting the value in the WHERE clause.

The more elegant solution would be to import the data as a Table variable
Code:
DECLARE @tblAccount as TABLE (acctID INT)

then include an inner join to it I imagine.

Hope this helps!

The early bird gets the worm, but the second mouse gets the cheese.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top