Jan 18, 2005 #1 oaklandar Technical User Joined Feb 12, 2004 Messages 246 Location 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 Joined Nov 3, 2004 Messages 407 Location 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 Joined Nov 8, 2002 Messages 53,708 Location 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
Jan 18, 2005 Thread starter #4 oaklandar Technical User Joined Feb 12, 2004 Messages 246 Location US Thanks Upvote 0 Downvote