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?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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?
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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.

QUERYEXAMPLE1158189544.JPG
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,729
Members
449,049
Latest member
MiguekHeka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top