473,657 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Syntac error (missing operator)

Hi - I can get this to work in SQL Server - but when also trying to make
the application compatible with MS Access I get an error:

Select tblfaqnetgroups .group_name from tblfaqnetroles
Inner Join tblfaqnetgroups ON tblfaqnetroles. group_id =
tblfaqnetgroups .group_id
Inner Join tblaccess ON tblfaqnetroles. user_id = tblaccess.user_ id
AND tblaccess.user_ id = 1

The error in Access is:

Syntax error (missing operator) in query expression
'tblfaqnetroles .group_id = tblfaqnetgroups .group_id
Inner Join tblaccess ON tblfaqnetroles. user_id = tblaccess.user_ id'

Any help would be much appreciated,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
3 9521

"Mark" <an*******@devd ex.com> wrote in message
news:3f******** *************@n ews.frii.net...
Hi - I can get this to work in SQL Server - but when also trying to make
the application compatible with MS Access I get an error:

Select tblfaqnetgroups .group_name from tblfaqnetroles
Inner Join tblfaqnetgroups ON tblfaqnetroles. group_id =
tblfaqnetgroups .group_id
Inner Join tblaccess ON tblfaqnetroles. user_id = tblaccess.user_ id
AND tblaccess.user_ id = 1

The error in Access is:

Syntax error (missing operator) in query expression
'tblfaqnetroles .group_id = tblfaqnetgroups .group_id
Inner Join tblaccess ON tblfaqnetroles. user_id = tblaccess.user_ id'

Any help would be much appreciated,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


This is more of an Access question, but it seems that Access requires
parentheses:

Select tblfaqnetgroups .group_name from ( tblfaqnetroles
Inner Join tblfaqnetgroups ON tblfaqnetroles. group_id =
tblfaqnetgroups .group_id )
Inner Join tblaccess ON tblfaqnetroles. user_id = tblaccess.user_ id
AND tblaccess.user_ id = 1

This syntax appears to work in MSSQL also, but the parentheses look
confusing (at least to me), as they suggest a derived table where there
isn't one.

Simon
Jul 20 '05 #2
Simon Hayes (sq*@hayes.ch) writes:
This is more of an Access question, but it seems that Access requires
parentheses:

Select tblfaqnetgroups .group_name from ( tblfaqnetroles
Inner Join tblfaqnetgroups ON tblfaqnetroles. group_id =
tblfaqnetgroups .group_id )
Inner Join tblaccess ON tblfaqnetroles. user_id = tblaccess.user_ id
AND tblaccess.user_ id = 1

This syntax appears to work in MSSQL also, but the parentheses look
confusing (at least to me), as they suggest a derived table where there
isn't one.


While I agree that the parentheses here are only white noice, there
are cases where you need them:
SELECT ...
FROM a
LEFT JOIN (b JOIN c ON b.col = c.col) ON a.col = b.col

Here, you (logically) first join b and c, and then you to an outer
join between a and this result.

--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #3
Erland Sommarskog <so****@algonet .se> wrote in message news:<Xn******* **************@ 127.0.0.1>...
Simon Hayes (sq*@hayes.ch) writes:
This is more of an Access question, but it seems that Access requires
parentheses:

Select tblfaqnetgroups .group_name from ( tblfaqnetroles
Inner Join tblfaqnetgroups ON tblfaqnetroles. group_id =
tblfaqnetgroups .group_id )
Inner Join tblaccess ON tblfaqnetroles. user_id = tblaccess.user_ id
AND tblaccess.user_ id = 1

This syntax appears to work in MSSQL also, but the parentheses look
confusing (at least to me), as they suggest a derived table where there
isn't one.


While I agree that the parentheses here are only white noice, there
are cases where you need them:
SELECT ...
FROM a
LEFT JOIN (b JOIN c ON b.col = c.col) ON a.col = b.col

Here, you (logically) first join b and c, and then you to an outer
join between a and this result.


Thanks for the clarification - I didn't mention this since the
original post is an inner join, but that may have misled the original
poster (hopefully not).
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2138
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator=' in '*this = CTest::operator+(CTest&)((+t2))' test2.cpp:49: error: candidates are: CTest CTest::operator=(CTest&) make: *** Error 1
0
1438
by: Murray Bryant | last post by:
I am having problems with contrib/tablefunc in postgresql 7.4.1 on freebsd when i try to make install i get the errors below. I am unable to make the 7.3 -> 7.4 transition until i can get the connectby function to work as i use it all the time. Can anyone suggest anything that i can do to get the connectby function
1
4586
by: JMCN | last post by:
I have an ftp program that i inherited and i tried to modify it to ftp over my file however, i receive an error message : run-time error '3075 syntax error (missing operator) in query expression " Get PROD6-12-22-03-299-2 c:temp\'PROD6FTCERT.txt 0 As Expr1;'. i'm clueless why i have a missing operator? if anyone has a suggestions that would be greatly appreciated :)
7
6876
by: John Øllgård Jensen | last post by:
Hi Using MS Asccess 2000: In a query I'm trying to create a new field with following expression: FilmDate: Left(,4) The field "FilmNo" is another text field in the query. This is expression should return the 4 leftmost characters of the FilmNo
0
1158
by: Argene Bowskill | last post by:
How do I fix an error in my SQL Syntac? I'm getting a message as follows: Microsoft OLE DB Provider For ODBC Drivers error 800400 14. You have an error in your SQL Syntac. I don't know what this means. I just know I have been trying to order some show tickets on line and it won't go through because of this error..
0
2050
by: erik.erikson | last post by:
I am getting a compiler error that I can't well explain or even understand the origin of (though I boiled it down close...). Below is a bare-bones example. What I am doing is defining the increment operator in a class and then defining a derived class and using the derived class. When I try to use the increment operator on an instance of the derived class (as an instance of the derived class, not when used as an instance of the base...
5
2375
by: rpjanaka | last post by:
Hi all, I am using AJAX to submit a data from a web page, it is properly working on the local host (when test with the local machine it is ok).also when access from another machine the pages are properly lord. But when send data it gives an http request error. The following is the error message. it include several suggestions, but i cant exactly deiced what it is.? pls anyone can help me to find the reason for this... ERROR The...
2
14894
by: yalbizu | last post by:
#include <iostream> #include <string> #include <fstream> #include <iomanip> using namespace std; const int NO_OF_STUDENTS=20; struct studentType { string studentFName; string studentLName;
3
3293
by: Margie | last post by:
Working on my database I use a modified piece of code gotten from thescripts. The code works perfectly except for one thing. When entering data containing the character ' , I get the error: Syntac error (missing operator) in query expression. It took me a while but I discovered that entering the character ' twice in the form, it's added to the table with only 1 '. Example 1: Jenny O'Neal -> gives an error Example 2: Jenny O''Neal ->...
0
8303
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4150
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.