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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieving values from .txt file to be placed in a sql statement.

Status
Not open for further replies.

wsam

MIS
Apr 27, 2001
19
CA
I am trying to create a sql script that gets values from a text file that looks like:

2234
1233
4455
223435

the statement will have to loop through the whole list, putting the information into another .txt file

the statement is :

select * from <table t> where t.id = x.txt <value from text file>

can anyone help?
 
I'd recommend loading the data from the first text file to a table via DTS (step 1). Then export the result of joining the two tables to the other text file via DTS (step 2).

SQL doesn't directly manipulate text files. However, it handles tables and relationships very well. Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top