In MS-Access, I have a main table looking like below:
so I have three defined areas, and I need to create an insert into statement dynamically from this table, as the table content can vary. The three defined areas all have an individual table, and the individual tables have the columns. These 3 tables also have a common ID column called “IDs”
So with this table , I would like to write dynamically an SQL
INSERT INTO (C1,C3,A1,...)
SELECT Table_801.C1, Table_651.C2,....
FROM Table_801
INNER JOIN Table_651 ON Table_651.IDs = Table_801.IDs
INNER JOIN Table_652 ON Table_652.IDs = Table_801.IDs
AND Table_801.IDs ='2345'
so is there any way of extracting the information from the main table to dynamically create the SQL?
I tried with building arrays from the main_table. but that seemed tedious. Especially retrieving the info from the arrays.