Dec 7, 2007 #1 TimTDP Technical User Feb 15, 2004 373 ZA I am a newbie! I have two tables. How do I join them in an sql statement so that I can use the data in a report?
I am a newbie! I have two tables. How do I join them in an sql statement so that I can use the data in a report?
Dec 7, 2007 1 #2 Andrzejek Programmer Jan 10, 2006 8,569 US You need to know how the 2 tables relate, which field is the Key, (let's say it is SSN) so you can: Code: SELECT Table1.*, Table2.* FROM Table1, Table2 WHERE Table1.SSN = Table2.SSN ORDER BY Table1.SomeField Have fun. ---- Andy Upvote 0 Downvote
You need to know how the 2 tables relate, which field is the Key, (let's say it is SSN) so you can: Code: SELECT Table1.*, Table2.* FROM Table1, Table2 WHERE Table1.SSN = Table2.SSN ORDER BY Table1.SomeField Have fun. ---- Andy