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

Search for pattern in another file and output result in file3

Status
Not open for further replies.

varajan

Technical User
Oct 5, 2001
42
0
0
IN
Can somebody help with the following ?

Input files

File 1 format
field1,field2 --> Both are text
....

File 2 format
fields1 --> text

Output File

File 3:
field1,field2,field3 --> Both are text

Requirement:
for each line in file1, search for file1.field1 and file1.field2 in file2.field1
AND
if match found in file2, then append the following details to file3
file1.field1, file1.field2, file2.field1


for each row in table1, I need to search for table1.field1 and table1.field2 in table2.field1, and if the search is successful then in table 3, I need to populate the following:
table3.field1 = table1.field1
table3.field2 = table1.field2
table3.field3 = table1.field3
 
Can you show us a live sample of file1 and file2
and how would you like file3 to look like.
Are the fields comma seperated?


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
Sounds like school work? Students are not supposed to post school assignments on this forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top