Jan 18, 2005 #1 oaklandar Technical User Feb 12, 2004 246 US How would I insert data from three tables into one table using a query? My attempt: Code: insert into TableFour select * From TableOne, TableTwo, TableThree It keeps saying duplicate problem. Please advise.
How would I insert data from three tables into one table using a query? My attempt: Code: insert into TableFour select * From TableOne, TableTwo, TableThree It keeps saying duplicate problem. Please advise.
Jan 18, 2005 #2 Lothario Programmer Nov 3, 2004 407 US may be you need to explicitly state the table names if there are same field names in the tables... insert into TableFour select t1.field1,t2.field1,t3.field1 From TableOne t1, TableTwo t2, TableThree t3 -L Upvote 0 Downvote
may be you need to explicitly state the table names if there are same field names in the tables... insert into TableFour select t1.field1,t2.field1,t3.field1 From TableOne t1, TableTwo t2, TableThree t3 -L
Jan 18, 2005 #3 PHV MIS Nov 8, 2002 53,708 FR And maybe its advisable to join the 3 tables to avoid cartesian product. Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
And maybe its advisable to join the 3 tables to avoid cartesian product. Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244