By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,930 Members | 1,383 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,930 IT Pros & Developers. It's quick & easy.

Help, my left join query gives "Syntax error in FROM clause!

P: 6
I am not certain if I set this up correctly - all help would be appreciated:

SELECT [MASTER EOG].ACCOUNTID, [MASTER EOG].PUBCODE, [MASTER EOG].NAME, [MASTER EOG].PIATYPE, [MASTER EOG].FOD, [MASTER EOG].SUBSLNGTH, [MASTER EOG].RATECODE, [MASTER EOG].CURRENTBAL, [MASTER EOG].EOGDATE, [MASTER EOG].TELEPHONE, [MASTER EOG].ASSIGNDATE
FROM [MASTER EOG] As t1 LEFT JOIN [CLC REPORTS] As t2
ON t1.ACCOUNTID = t2.ACCOUNTID, ON t1.PUBCODE = t2.PubCode, ON t1.NAME = t2.Name, ON t1.RATECODE = t2.RateCode, ON t1.EOGDATE = t2.EOGDate, ON t1.TELEPHONE = t2.Telephone
Apr 30 '07 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,366
A few things are wrong with it. Why not set up the query in design view and then look at the SQL?

1) If you use an alias, it must be used throughout. Which you didn't do for the fields you wanted to include.

2) Joining on multiple fields is represented through the AND operator and not through a comma.

3) You don't repeat the ON keyword.
Apr 30 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.