Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help with SQL statement

Status
Not open for further replies.

maxf

Programmer
Oct 2, 2002
25
US
Im getting this error:

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression 'rs.pathnames=cl.path_groups Inner Join Alternative_medicine ALM ON rs.pathnames=ALM.PATH_Group_Name'.


when running this sql statement:

Select rs.* From Reduced_Sample_for_Demonstration RS Inner Join Claims_Rates CL ON rs.pathnames=cl.path_groups Inner Join Alternative_medicine ALM ON rs.pathnames=alm.PATH_Group_Name

*rs.pathnames,cl.path_groups and alm.PATH_Group_Name are the related columns, although their column names do not correspond, their values are the same and the data types of all these columns are text. I simply want to join all 3 tables based on this column. I have a WHERE clause Im going to add, but first I simply want to get this join working, but I cant figure out what the problem with this query is.

Thanks for any help
 
It appears that you're trying to use the alias's RS and CL and ALM without the AS..

Select rs.* From Reduced_Sample_for_Demonstration RS Inner Join Claims_Rates CL ON rs.pathnames=cl.path_groups Inner Join Alternative_medicine ALM ON rs.pathnames=alm.PATH_Group_Name

should be

Select rs.* From Reduced_Sample_for_Demonstration AS RS Inner Join Claims_Rates AS CL ON rs.pathnames=cl.path_groups Inner Join Alternative_medicine AS ALM ON rs.pathnames=alm.PATH_Group_Name

There are two ways to write error-free programs; only the third one works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top