Hello,
Can someone point me in the right direction for building the SQL to do the following (I've used generic names for the example - hopefully to make the concept clearer) : I've tried an insert/append query but am not sure how to insert multiple rows based on another field criteria.
There are 2 tables.
Table 1 = Tbl_ToBeUpdated (ID, departure).
Table 2 = Tbl_SourceTable(ID, LGW,LHR,STN,MAN etc.... about 20 airport departure point fields). The departure point fields are text and are either "Yes" or "No" indicating whether that ID departs from that airport.There are multiple departure points per record.
eg.
ID LGW LHR STN MAN BHX etc... BFS
0001 YES NO NO YES NO YES
I need to insert records into Tbl_ToBeUpdated based on how many depearture points are Yes,so in above example there would be 3 records inserted into the new table for ID = 0001.
Tbl_ToBeUpdated
ID departure
0001 LGW
0001 MAN
0001 BFS
I need to fdo this for over 1500 id's. Any help appreciated.
Can someone point me in the right direction for building the SQL to do the following (I've used generic names for the example - hopefully to make the concept clearer) : I've tried an insert/append query but am not sure how to insert multiple rows based on another field criteria.
There are 2 tables.
Table 1 = Tbl_ToBeUpdated (ID, departure).
Table 2 = Tbl_SourceTable(ID, LGW,LHR,STN,MAN etc.... about 20 airport departure point fields). The departure point fields are text and are either "Yes" or "No" indicating whether that ID departs from that airport.There are multiple departure points per record.
eg.
ID LGW LHR STN MAN BHX etc... BFS
0001 YES NO NO YES NO YES
I need to insert records into Tbl_ToBeUpdated based on how many depearture points are Yes,so in above example there would be 3 records inserted into the new table for ID = 0001.
Tbl_ToBeUpdated
ID departure
0001 LGW
0001 MAN
0001 BFS
I need to fdo this for over 1500 id's. Any help appreciated.