How to resolve ORA 00936 Missing Expression Error?
NOTE :: rrfh table contains no data.
5 Answers 5
Remove the comma?
SELECTING from multiple tables You can include multiple tables in the FROM clause by listing the tables with a comma in between each table name
![]()
Remove the coma at the end of your SELECT statement (VALUE,), and also remove the one at the end of your FROM statement (rrf b,)
This answer is not the answer for the above mentioned question but it is related to same topic and might be useful for people searching for same error.
I faced the same error when I executed below mentioned query.
select OR.* from ORDER_REL_STAT OR
problem with above query was OR is keyword so it was expecting other values when I replaced with some other alias it worked fine.
How to resolve the ORA-00936 missing expression

ORA-00936 : missing expression is one of the common error everybody working in Oracle SQL must have faced some time. This generally happens when you omit important thing in the Sql statement i.e you left out an important chunk of what you were trying to run
Cause of ORA-00936 : missing expression
This Oracle error is mainly related to the SQL SELECT statements. One obvious reason is select column list is missing or expressions in the selected columns are incomplete.
Please enable JavaScript
Check list to run to resolve the ORA-00936 missing expression error
(1) It happens when you forget to list the column in the select statement
The correct way would be list the column you want to select
(2) We sometimes makes mistake in the usage of Distinct statement. Following statement will fail with ORA-00936
Having two distinct clause does not make sense and give error
distinct can be used in the starting only
So correct statement would be
(3) This error is caused when part of the expression is omitted , some examples are
** operators works in PLSQL but not in SQL, We need to use Power function for it, So correct way would be
(4) Another example
Here you forget to mention column name after the concatenation operator, the correct SQL would be
(5) When you add extra commas in the list of column
So we need to double check the SQL statement when we hit this error and make sure we are doing the common mistake
(6) This error will also come if you omit the From in the SQL statement
Here we missed to mention the from clause.SELECT statement has three parts: to wit: “SELECT->FROM->WHERE
You can omit where clause but select and from are necessary
(7) It can also occurs in insert statement like below
We don’t need values as in this statement
(8) We can sometimes mix up user-defined functions and Oracle functions, and doing so can lead to confused syntax that would result in an error message.So avoid them
(9) There are Oracle some bugs also
(a) Bug:4567818 base Bug#:4192148 – unpublished on 9207
(b) Bug:4212516 (unpublished) on oracle 10.1.0.4.0.
With these bugs, ORA-00936 error is thrown when the SELECT ON view fails. Basically, ORA-00936 is thrown when a SQL view is created from “create or replace view MY_VIEW as select t.*,other_tab_col from tab t, other_tab”.This creates a view definition that is incorrect in the DBA_VIEWS, thus throwing ORA-00936 and possible core dumps.In order to fix the bugs and resolve ORA-00936, MetaLink offers these solutions for the appropriate version:
Fix for 9.2.0.7 :Patch 4192148 is available for Solaris (64bit) and AIX5L Based Systems (64-bit).Fix for 10.1.0.4 :
Patch 4212516 is available for most of the platforms.
In nutshell, ORA-00936 missing expression can be resolved by carefully checking your SQL statement.
Ora 00936 missing expression что значит
Some Oracle mistakes are not nearly as intimidating to resolve as the error message would seem to indicate. The ORA-00936 is the perfect example of such a case. This error provides an excellent case where thinking too hard about the answer will cost you far more time and effort than needed.
The ORA-00936 message is a missing expression error in Oracle. All that ‘missing expression’ means is that When attempting to operate a query, a particular part of the clause necessary for it to function was omitted in the text. Stated simply, you left out an important chunk of what you were trying to run. This can happen fairly easily, but provided below are two examples that are the most common occurrence of this issue.
The first example is the product of missing information in a SELECT statement, which triggers the vast majority of ORA-00936 errors. This occurs when entering SELECT on the first line, but then failing to reference the list of columns following the SELECT. If you just enter ‘SELECT’ on line one, and then ‘FROM abc;’ on line two, the ORA-00936 message will be prompted. To fix this, go back and choose a column to input after SELECT so that line one looks something like ‘SELECT distributors_name, distributors_location’, with line two remaining the same. This will correct the error and allow the SELECT statement to process.
Conversely, the error can happen in the latter half of a SQL statement. If the FROM clause within the statement is omitted, the error message will be thrown. You will need to look back at the syntax of the statement and make sure that for items such as SELECT statements, the next line includes a FROM clause (such as ‘FROM list_of_suppliers’) so that the SELECT clause knows where to be triggering information from within the database.
The ORA-00936 error can be prevented by double-checking instances of SQL clauses and making sure that all statements are derived from the proper syntax. This, of course, extends beyond just SELECT statements but also FROM and WHERE statements as well (or any other clause meant to trigger a query). Be positive that any Oracle functions used are spelled out properly, and keep tabs of user-defined functions. It can be easy to mix up user-defined functions and Oracle functions, and doing so can lead to confused syntax that would result in an error message. The representatives at a licensed Oracle consultant firm can work with you to make sure that you understand the difference between these types of functions and have proper knowledge of the individual functions that come pre-equipped with Oracle database software.
ORA-00936: missing expression :
In my previous article, I have explained about the most common errors in Oracle. In This article, I will try to explain another most common error, which has been searched approximately 15000 times in a month by DBAs and developers. When you forget the actual syntax of the oracle select statement then the ORA-00936 missing expression error will come. While working with databases I have frequently faced ORA-00936: missing expression and struggled to solve and debug this issue. This kind of error will occur when user miss the syntax of SQL expression.
ORA-00936: missing expression is very common oracle error occurred due to the syntax of oracle statement.
Why ORA-00936 error will come?
Some Oracle mistakes are not nearly as intimidating to resolve, as the error message would seem to indicate. The ORA-00936 is the perfect example of such a case. This error provides an excellent case where thinking too hard about the answer will cost you far more time and effort than needed.
Reason for this error:
The ORA-00936 message is a missing expression error in Oracle. That entire ‘missing expression’ means is that when attempting to operate a query, a particular part of the clause necessary for it to function was omitted in the text. Stated simply, you left out an important chunk of what you were trying to run. This is most common error occurred during the syntax of SQL statement. If user failed to write or omit something in SQL query then ‘Missing Expression’ error will come.
Missing Information in Select Statement:
If user forgets to write the columns in the select statement then missing expression error will come.
Example:
Select * from Employee;
Select from Employee; —Error of missing expression will come.
From Clause is Omitted:
If user forgets to write the ‘from clause’ in select statement then missing expression error will come.

NO TIME TO READ CLICK HERE TO GET THIS ARTICLE
Example:
Select * from Employee;
Select * Employee; —Missing Expression error will come
Resolution of the error:
As I have explained that missing expression error will come due to the bad syntax of ‘Select statement’ user needs to check the select statement is properly written or not. While working with huge queries then it is not easy for the user to find out where the actual error is. So finding out where the error is coming is important.
Resolution 1:
User needs to check the missing information from select statement. Most of the time the column names are missing in select statement.User needs to check that all columns are there in select statement.User needs to check the columns using desc command and make changes in the select statement.
Example :
It will fire that error so user needs to check the columns in Employee table using following statement:
Desc Employee;
Select Employee_Name,Employee_Number from Employee;
Resolution 2 :
Add from Clause in select statement
User needs to add ‘From’ clause at proper place in select statement.
Resolution Query :
So these kind of errors are very easy to solve just user needs to concentrate on syntax of select statement.