473,503 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

6 New Member
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
1 2359
Rabbit
12,516 Recognized Expert Moderator MVP
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

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

Similar topics

1
721
by: Stijn Goris | last post by:
I get an error when trying to insert a new row: query error- 5 - Duplicate entry '80.200.213.102 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser ; MyIE2; .NET CLR 1.0.' for key 1...
2
2914
by: Jim Hatfield | last post by:
I'm using: "select min(objid) from table_name where objid > $objid" to select the next row in a sequence where there may be gaps. It works fine unless the where clause results in an empty set. ...
2
716
by: Craig Stadler | last post by:
Im trying to write a like query select * from table1 where column1 like 'abc%' (I realize this syntax isnt correct) I want to include any chars from 0-9 in that spot... Does anyone know how...
3
1914
by: Spartanicus | last post by:
How to get help from this group, and how to construct a minimised test case: http://www.spartanicus.utvinternet.ie/help_us_help_you.htm -- Spartanicus
6
1943
by: vips | last post by:
Page_Load datagrid1.datasource=dataset1 //I am filling the datagrid and it works fine when page is displayed end ---------------
3
3967
by: Ramesh Dodamani | last post by:
Environment: XP Pro, VS.Net 2003, .Net 1.1.4322 with SP1 & KB Hotfix 886903 P4 2.2GHz, 1 GB RAM My system was working fine till a few weeks back when I started seeing the following errors. ...
12
5683
by: arnuld | last post by:
in C++ Primer 4/3 Lippman says in chapter 3, section 3.3.1: vector<stringsvec(10); // 10 elements, each an empty string here is the the code output & output from my Debian box running "gcc...
1
5172
by: imtmub | last post by:
Hi, I have a access database for simple accounts. I want to run the query from my excel sheet and get the result to that respective cells. My database contains accounts name, type, credit limit,...
1
2190
by: artteam | last post by:
we are having a sql query error when we are trying to update values from the datagridview to access database. The problem is because of date(because of its format), a runtime error pops up saying...
6
1522
by: ranesmitas | last post by:
Hi ,I am using Visual Basic Backend SQL I create form in which i create Command button NEW ,MODIFY, VIEW,SAVE,EXIT all my programme is running but when i add new record and save and then i...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.