Can someone help me compile a query that will select a table/file based on item in a row.
For example, I have attached three tables. These tables arrive in folder.
As you can see TableOne has a load_id of 1111, TableTwo has a load_id of 1122, and TableThree has a load_id of 1133.
I'm trying to write a query that will select a table in the folder based on the value of the load_id number. So, if TableThree arrived in the folder before before TableTwo I 'don't' want my query to select that table. Likewise, if table TableTwo arrived in the folder before before TableOne I don't want my query to select that table.
The best way I think I can explain it is like this:
select * from TableThree where LOAD_ID = 1133, but only if in a previous select statement I checked for LOAD_ID from a previous table(TableTwo in this case) and successfully found LOAD_ID = 1122.
I hope want I've describe makes sense.
Please let me know if you need further clarification