473,327 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Runtime error 3075 with SQL statement

"SELECT [HPD:HelpDesk].[Case-ID+], [HPD:HelpDesk].Category
INTO tblSiteGroupActiveTicketRawData FROM [HPD:HelpDesk
WHERE (([HPD:HelpDesk].Base = 'AAAA') OR ([HPD:HelpDesk].Base = 'BBBB')) AND ([HPD:HelpDesk].Status != 'Closed');"

Above SQL string fails with a runtime error 3075 syntax error (operator missing). I cannot figure this one out. Any assistance would be appreciated.
Jan 7 '08 #1
5 3460
JKing
1,206 Expert 1GB
"SELECT [HPD:HelpDesk].[Case-ID+], [HPD:HelpDesk].Category
INTO tblSiteGroupActiveTicketRawData FROM [HPD:HelpDesk
WHERE (([HPD:HelpDesk].Base = 'AAAA') OR ([HPD:HelpDesk].Base = 'BBBB')) AND ([HPD:HelpDesk].Status != 'Closed');"

Above SQL string fails with a runtime error 3075 syntax error (operator missing). I cannot figure this one out. Any assistance would be appreciated.

Hey there,

At a quick glance it looks like you're missing a closing bracket on your FROM line.

"SELECT [HPD:HelpDesk].[Case-ID+], [HPD:HelpDesk].Category
INTO tblSiteGroupActiveTicketRawData
FROM [HPD:HelpDesk]
WHERE (([HPD:HelpDesk].Base = 'AAAA') OR ([HPD:HelpDesk].Base = 'BBBB')) AND ([HPD:HelpDesk].Status != 'Closed');"
Jan 7 '08 #2
I'm pretty sure that is a typo on my part in the forum as it is there in the actual string.

SELECT [HPD:HelpDesk].[Case-ID+], [HPD:HelpDesk].Category INTO tblSiteGroupActiveTicketRawData FROM [HPD:HelpDesk] WHERE (([HPD:HelpDesk].Base = 'AAAA') OR ([HPD:HelpDesk].Base = 'BBBB')) AND ([HPD:HelpDesk].Status != 'Closed');

I think I erased the bracket when I formatted it for easier reading. The string above is a direct cut/paste from the query.
Jan 7 '08 #3
jaxjagfan
254 Expert 100+
I'm pretty sure that is a typo on my part in the forum as it is there in the actual string.

SELECT [HPD:HelpDesk].[Case-ID+], [HPD:HelpDesk].Category INTO tblSiteGroupActiveTicketRawData FROM [HPD:HelpDesk] WHERE (([HPD:HelpDesk].Base = 'AAAA') OR ([HPD:HelpDesk].Base = 'BBBB')) AND ([HPD:HelpDesk].Status != 'Closed');

I think I erased the bracket when I formatted it for easier reading. The string above is a direct cut/paste from the query.
Is "Status !" a field name?

SELECT [HPD:HelpDesk].[Case-ID+], [HPD:HelpDesk].Category INTO tblSiteGroupActiveTicketRawData FROM [HPD:HelpDesk] WHERE ([HPD:HelpDesk].Base IN ('AAAA', 'BBBB')) AND ([HPD:HelpDesk].[Status !] = 'Closed');

Just a habit but changed the OR to IN. Also make sure those same columns exist in "tblSiteGroupActiveTicketRawData " as they are in "HPD:HelpDesk". If not use "AS" to rename the "HPD:HelpDesk" columns.

The special characters (:,-,+,!) are not good to have as field names and makes things a bit more difficult to develop reports, queries, and to reference elsewhere.
Jan 7 '08 #4
JKing
1,206 Expert 1GB
I'm pretty sure that is a typo on my part in the forum as it is there in the actual string.

SELECT [HPD:HelpDesk].[Case-ID+], [HPD:HelpDesk].Category INTO tblSiteGroupActiveTicketRawData FROM [HPD:HelpDesk] WHERE (([HPD:HelpDesk].Base = 'AAAA') OR ([HPD:HelpDesk].Base = 'BBBB')) AND ([HPD:HelpDesk].Status != 'Closed');

I think I erased the bracket when I formatted it for easier reading. The string above is a direct cut/paste from the query.
Try this..

Expand|Select|Wrap|Line Numbers
  1. SELECT [HPD:HelpDesk].[Case-ID+], [HPD:HelpDesk].Category INTO tblSiteGroupActiveTicketRawData FROM [HPD:HelpDesk] WHERE (([HPD:HelpDesk].Base = 'AAAA') OR ([HPD:HelpDesk].Base = 'BBBB')) AND ([HPD:HelpDesk].Status NOT IN ('Closed'));
  2.  
Jan 7 '08 #5
JKing
1,206 Expert 1GB
The != operator is not recognized as being a proper operator.

The correct syntax for this operator is <>.

Example:
Expand|Select|Wrap|Line Numbers
  1. SELECT firstName, lastName
  2. FROM tblPerson
  3. WHERE firstName <> 'Bob'
  4.  
Jan 8 '08 #6

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

Similar topics

1
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...
25
by: MLH | last post by:
Is it a common occurrence for A97 VBA to 'RACE' on past a debug.print statement? I have been trying to debug a problem (which turned out to be an attempt to assign Null to a Date Type variable)...
8
by: g_man | last post by:
I am trying trap Runtime error 3022 (duplicates) in the click event of a command button that closes the form. I have code in the Form_Error event that does a good job of providing a more meaningful...
0
by: j.rogel | last post by:
Hello everyone! I am new to this sort of postings so I'm not even sure if this is the correct place to start. Anyway, I would realy appreciate any help. I have a some VBA code that works quite...
2
by: jr | last post by:
Hello everyone! I am new to this sort of postings so I'm not even sure if this is the correct place to start. Anyway, I would realy appreciate any help. I have a some VBA code that works quite...
1
by: kickergirl | last post by:
I recently created a database in Access 2000 that has been distributed to multiple people using various versions of Access. Each person is using it as a standalone database. The database has...
17
by: trose178 | last post by:
Good day all, I am working on a multi-select list box for a standard question checklist database and I am running into a syntax error in the code that I cannot seem to correct. I will also note...
3
by: adigga1 | last post by:
Hello Experts, I'm about to go grey with this dlookup statement: I'm trying to run a dlookup statement, I have the correct expression string, etc. but when I run it under the Immediate window...
3
by: timber910 | last post by:
Hello All, I'm in need of help here. I have build my query in a query builder in access as a select query. Query runs fine. Changed it to a make table query. Query makes table ok. Copy and pasted...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.