Link to home
Start Free TrialLog in
Avatar of Rupert Eghardt
Rupert EghardtFlag for South Africa

asked on

SQL query / script

Hi Guys,

I need help with a SQL query / script,

We have two tables,
SQL TABLE 01 - with primary employee records , identified by the person's ID number.
SQL TABLE 02 - with multiple records for each employee, relating back to the primary table by employee ID number.

Ideally I would like to extract the information to Text / CSV for only a specific list of employee ID numbers.

For example:  
A text file (A) with 1000 employee ID numbers.
A script to read the text file (A), do a lookup on each employee in SQL TABLE 01.  Write the result to another text file (B).
The same script to lookup the same employee records by ID number in SQL TABLE 02, write all relating records to Text File (B).

Thus, the text file (B) will have primary and secondary employee records from the list of employee ID numbers in text file (A).
ASKER CERTIFIED SOLUTION
Avatar of Robert
Robert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
can you provide some sample data with expected output.