Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 16th, 2008, 11:16 AM
mrsgwen mrsgwen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 4 mrsgwen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 33 m 15 sec
Reputation Power: 0
Syntax error (missing operator) in query expression

I have a query that I'm trying to run in access which works perfectly fine in Sql. But it keeps giving me the error: Syntax error (missing operator) in query expression Attorney.EmpID = dbo_tbl_Files.AttyID
INNER JOIN dbo_tbl_Employees As Secretary ON Secretary.EmpID = dbo_tbl_Files.SectID



here is my query:
SELECT dbo_tbl_Files.FileID, dbo_tbl_Files.SectID, dbo_tbl_Files.AttyID, (RTrim(Attorney.LName) & ', ' & RTrim(Attorney.FName)) as Attorney, (RTrim(Secretary.LName) & ', ' & RTrim(Secretary.FName)) As Secretary, dbo_tbl_Files.FileNo, dbo_tbl_Files.FileName, dbo_tbl_Files.Dept, dbo_tbl_Files.DateOpened, dbo_tbl_Files.Description, dbo_tbl_Files.Status
FROM dbo_tbl_Files
INNER JOIN dbo_tbl_Employees As Attorney ON Attorney.EmpID = dbo_tbl_Files.AttyID
INNER JOIN dbo_tbl_Employees As Secretary ON Secretary.EmpID = dbo_tbl_Files.SectID

Reply With Quote
  #2  
Old December 16th, 2008, 11:46 AM
AlanSidman's Avatar
AlanSidman AlanSidman is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2008
Location: Lake County, IL
Posts: 240 AlanSidman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 15 h 49 m 19 sec
Reputation Power: 6
Did you remember to put a semi-colon ; at the end of your SQL statement?

Alan

Reply With Quote
  #3  
Old December 16th, 2008, 11:56 AM
mrsgwen mrsgwen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 4 mrsgwen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 33 m 15 sec
Reputation Power: 0
yes I just did it but it still doesn't work.

Reply With Quote
  #4  
Old December 16th, 2008, 03:37 PM
dykebert's Avatar
dykebert dykebert is offline
Contributing User
Click here for more information
 
Join Date: Apr 2008
Posts: 429 dykebert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 Days 30 m 5 sec
Reputation Power: 7
seems to me I ran into something like this a while back.

First make sure you have a space after the

Attorney.EmpID = dbo_tbl_Files.AttyID

and before the

INNER JOIN dbo_tbl_Employees As Secretary ...

If you just have a carriage return you'll get a syntax error.

also try putting parens around the first inner join like so:

FROM (dbo_tbl_Files
INNER JOIN dbo_tbl_Employees As Attorney ON Attorney.EmpID = dbo_tbl_Files.AttyID)
INNER JOIN dbo_tbl_Employees As Secretary ON Secretary.EmpID = dbo_tbl_Files.SectID
__________________
P.S. I am looking for work. <grin>.

Reply With Quote
  #5  
Old April 1st, 2011, 07:24 PM
emildd emildd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 4 emildd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 55 m 6 sec
Reputation Power: 0
Unhappy New Thread (Help) - Syntax Error (missing operator)

Hello All,

I would love to post a new thread, but for the life of me I can't find where it gives you this option. I'm new to this posting, I usually find the answer. Currently though, I have no programming experience and our expert went to a new job. Anyway, I'm posting this issue and I hope someone can provide me some help.

When trying to enable the Access Database to load more data, I get the following error.

"Run-time '3075'

Syntax error (missing operator) in query expression 'MissionDate = #3/31/2011# AND MissionNo ='."


I would really appreciate your assistance.

Thanks in advance.

Reply With Quote
  #6  
Old April 2nd, 2011, 12:22 PM
June7's Avatar
June7 June7 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2010
Location: The Great Land
Posts: 256 June7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 9 h 29 m 29 sec
Reputation Power: 5
mrsgwen,
Is this query built with Access query designer? Or are you typing it yourself in VBA or SQL View of the designer? If you build with the designer it will parenthesize properly. Since this is missing all the parens the designer will produce, indicates you are typing this.

emildd,
What do you mean by 'enable'? Just opening the project produces this error? Or is the project open and you are opening a form? This is the WHERE clause of an SQL statement? MissionNo criteria is a period? Clause looks incomplete. Post the entire SQL statement for analysis. You will find menu selection to start a thread just above the list of threads in forum at the right side. The blue box labeled 'Forum Tools'.

Last edited by June7 : April 2nd, 2011 at 12:25 PM.

Reply With Quote
  #7  
Old April 2nd, 2011, 11:25 PM
emildd emildd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 4 emildd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 55 m 6 sec
Reputation Power: 0
It's built in Access and it appears to be looking for some other information. The database was working fine, but we had some updates and I edited some other info and I thought I put the same info back in the code, but I obviously didn't. Once I tried to edit the data, by enabling the database, it wouldn't work.

When I first login, in order to modify the data, I have to click "Options", then it allows me to check a box to "enable the database". It does give me this error once I try to run the project. We have 15 lines where we can enter data and previously had 12 lines filled in. I modified it to only read 8 lines because things changed. I'm not sure if I need some filler information for the remaining lines, or what's wrong.

Thanks for your help.

Reply With Quote
  #8  
Old April 3rd, 2011, 02:56 AM
June7's Avatar
June7 June7 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2010
Location: The Great Land
Posts: 256 June7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 9 h 29 m 29 sec
Reputation Power: 5
emildd,
Sorry, nothing you describe in your last post makes sense to me. I am not familiar with Option to Enable database. What version of Access? Guess I would have to experience this issue. If you want to upload project to a fileshare site such as Box.net and post link to the file, I will look at it.

Last edited by June7 : April 3rd, 2011 at 06:08 AM.

Reply With Quote
  #9  
Old April 3rd, 2011, 03:17 AM
emildd emildd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 4 emildd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 55 m 6 sec
Reputation Power: 0
I would love to load it, but it's not possible. I really appreciate your assistance and I suck at explaining what I need. I'm a network guy. Programming is VERY foreign to me.

Once again, thanks. I'm headed home for the day, but I'm going to type up as much as I tomorrow and maybe you can help me a little further.

Reply With Quote
  #10  
Old April 4th, 2011, 02:15 AM
emildd emildd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 4 emildd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 55 m 6 sec
Reputation Power: 0
Problem is now fixed. One of my coworkers figured it out.

Thanks for your assistance.

Reply With Quote
  #11  
Old May 21st, 2012, 06:21 PM
Carmageddon Carmageddon is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 1 Carmageddon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 35 sec
Reputation Power: 0
Guys, I too have similar problem, since Access is unable to do an automatic LEFT JOIN ( I want to list all orders without a payment), I have decided to do it myself:


SELECT orders.order_id, games.game_name, stores.[שם חנות], stores.טלפון, orders.כמות, payments.[סכום_תשלום], orders.[תאריך הזמנה], payments.is_paid
FROM orders LEFT JOIN payments ON orders.order_id = payments.order_id
JOIN games ON orders.[קוד משחק] = games.[ID]
JOIN stores ON stores.store_id = orders.store_id
WHERE payments.is_paid=False;


I get the same error as the Original Poster:
Syntax error (missing operator) in query expression 'orders.order_id = payments.order_id
JOIN games ON orders.[קוד משחק] = games.[ID]
JOIN stores ON stores.store_i'.

Please, any help? Access does not really hint where is the problem, probably something minor.

Reply With Quote
  #12  
Old May 22nd, 2012, 04:45 AM
June7's Avatar
June7 June7 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2010
Location: The Great Land
Posts: 256 June7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 9 h 29 m 29 sec
Reputation Power: 5
You can change the join type in the query designer. Double click the line linking tables to open dialog.

Join syntax appears incomplete. Shouldn't join type be INNER JOIN, LEFT JOIN, or RIGHT JOIN? Never seen just 'JOIN'.
__________________
I like to know if my suggestion helped you. One way to let me know is by clicking scales at top right corner of post.
Debug!Debug!Debug!http://www.cpearson.com/excel/debug.htm

Reply With Quote
  #13  
Old May 22nd, 2012, 08:30 PM
Esther255 Esther255 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 3 Esther255 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 2 sec
Reputation Power: 0
Here's what's going on with 'not a valid result resource' errors. Take the following example:URLURLURLURL

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Syntax error (missing operator) in query expression


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap