Missing Expression Error ORA-00936

aka_krakur

Active Member
Joined
Jan 31, 2006
Messages
438
I get this message when I try & refresh a query I made in Microsoft Query (I didn't use SQL). Anyway, It runs great the 1st time. But if I go in to edit it and then refresh or try and return data to Excel, I get the error message:

Missing Expression Error ORA-00936

The SQL is really short (like 1 page copied/pasted into Word) when I originally set the Criteria in Microsoft Query; I use only 1 line to create the criteria

But when I go in to edit the same query, the SQL becomes really long (like 15 pages copied/pasted into Word). There are 125 different lines in the Criteria after opening it back up

Is there a limit to how much different criteria it can take?
 

Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,830
Office Version
  1. 365
Platform
  1. Windows
You say the SQL is really short, but it takes up a whole page?

Doesn't sound short to me.:)

What are you actually querying?
 

aka_krakur

Active Member
Joined
Jan 31, 2006
Messages
438
Here is an example of the criteria used in the Microsoft Query.

A short break down of what I am trying to accomplish is:
Product_family: Give the user up to 5 choices to query
Device Code: Gives the user the option to exclude only one (1) device code from the query
Division: filters the data to bring back only division 'CP'
Date: has the user input a start data and an end date
Region: allows user to filter by specific region
Country: allows user up to 5 different countries to filter by
Complaint: user can specify to return only records with a Y or an N

Now with all that said, I understand that realistically what I am writing when I put in the criteria as shown below is 125 different variations
I'd copy/paste them but it would be really long.

Below is exactly what I type the 1st time to return data to my excel spreadsheet (which works); it's just when I go back in to edit that I get an error message.
Book2
ABCDEFGH
1Product_FamilyDevice_CodeDivisionDateClarifierRegionCountryComplaint
2LIKE [PF1] OR LIKE [PF2] OR LIKE [PF3] OR LIKE [PF4] OR LIKE [PF5]NOT LIKE [EXCLUDE]CP'>=[DATE1] AND<=[DATE2]LIKE [CL1] OR LIKE [CL2] OR LIKE [CL3] OR LIKE [CL4] OR LIKE [CL5]LIKE [REGION1]LIKE [C1] OR LIKE [C2] OR LIKE [C3] OR LIKE [C4] OR LIKE [C5]LIKE [Y/N]
Sheet1
 

aka_krakur

Active Member
Joined
Jan 31, 2006
Messages
438
oh apparently this forum doesn't like the symbol "<" or ">" so the &gt, are supposed to be the greater than symbols and the &lt is supposed to be the less than symbols
 

aka_krakur

Active Member
Joined
Jan 31, 2006
Messages
438

ADVERTISEMENT

Here's a img of a screenshot to show I even shrunk down the criteria to only 2 on the Product family (PF1 & PF2) and 2 on the Clarifier (CL1 & CL2) and I still get the error message.

 

aka_krakur

Active Member
Joined
Jan 31, 2006
Messages
438
I'm curious to know if anyone has a clue about this one at all. I'm stuck right now, especially considering I dropped the criteria down to only 4 choices.
When it's written on 1 line it works
But going back in to edit it, it breaks it down to 4 separate lines do the "OR" statements, but when I refresh it gives me this ORA-00936:missing expression error. I don't get it.

Please someone help.
 

aka_krakur

Active Member
Joined
Jan 31, 2006
Messages
438
Just checking back. Has anyone had any experience whether related to this or not with this Microsoft Query error: ORA-00936: missing expression

I checked out Microsoft's Knowledgbase on this subject, and had no luck either. There are a lot of postings on this error message, but they all relate to SQL and I cannot figure out what it's saying I'm missing as far as a missing expression.
 

Watch MrExcel Video

Forum statistics

Threads
1,108,816
Messages
5,525,064
Members
409,617
Latest member
Lenaf

This Week's Hot Topics

Top