Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
luis1010
Starting Member
5 Posts |
Posted - 2007-12-02 : 15:54:17
|
| I am trying to join three tables and I keep getting a syntax error:syntax error in query expression r.intRegID = i.intRegID JOIN tbl_Categories c on i.intCategoryID=c.intCategoryIDThe full query is:SELECT *from tbl_RegistrationInfo r INNER JOIN tbl_Ideas ion r.intRegID = i.intRegID JOIN tbl_Categories con i.intCategoryID=c.intCategoryIDwhere i.intIdeaID=4ORDER BY i.DateCreatedTHe common key for the tables tbl_RegistrationInfo and tbl_Ideas is intRegID.THe common key for the tables tbl_Ideas and tbl_Categories is intCategoryID.And finally the user provides a value for the "idea" (i.intIdeaID=4).I can't seem to find the error and it is driving me nuts. Can someone please help?Thanks,Luis |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-02 : 16:05:52
|
| Tried take out inner from first join? |
 |
|
|
luis1010
Starting Member
5 Posts |
Posted - 2007-12-02 : 16:30:43
|
| I did:SELECT *FROM tbl_RegistrationInfo r JOIN tbl_Ideas ion r.intRegID = i.intRegID JOIN tbl_Categories con i.intCategoryID=c.intCategoryIDwhere i.intIdeaID=4ORDER BY i.DateCreated and now i get a new syntax error:'syntax error in FROM clause'Thanks,Luis |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-12-02 : 19:20:34
|
Your query looks fine. Is this on Microsoft SQL Server ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
luis1010
Starting Member
5 Posts |
Posted - 2007-12-03 : 09:48:42
|
| it is a query being done on data in access |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2007-12-03 : 11:07:56
|
| >> it is a query being done on data in accessThis is a SQL Server forum. You should post your questions regarding Access in the MS Access forum.- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
|
|
|
|