20
Select /*+USE_HASH( a b ) */ to_char(date, 'MM/DD/YYYY HH24:MI:SS') as LABEL,
ltrim(rtrim(substr(oled, 9, 16))) as VALUE,
from rrfh a, rrf b,
where ltrim(rtrim(substr(oled, 1, 9))) = 'stata kish' 
and a.xyz = b.xyz 

The "from " (3rd line) part of the above query is giving me ORA-00936 Missing EXPRESSION error. Please Help me

NOTE :: rrfh table contains no data.

Aruna
  • 11,959
  • 3
  • 28
  • 42
user1466466
  • 1,206
  • 5
  • 15
  • 19
  • 4
    This error always means that Oracle is expecting another column and or table... it's usually caused by unneeded trailing commas as in your case or by unbalanced parenthesis. – Ben Aug 28 '12 at 12:19
  • 1
    I had an extra comma in my query :) – Siddhartha Aug 23 '19 at 17:44

4 Answers4

26

Remove the comma?

select /*+USE_HASH( a b ) */ to_char(date, 'MM/DD/YYYY HH24:MI:SS') as LABEL,
ltrim(rtrim(substr(oled, 9, 16))) as VALUE
from rrfh a, rrf b
where ltrim(rtrim(substr(oled, 1, 9))) = 'stata kish' 
and a.xyz = b.xyz

Have a look at FROM

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

Adriaan Stander
  • 162,879
  • 31
  • 289
  • 284
  • select /*+USE_HASH( a b ) */ to_char(date, 'MM/DD/YYYY HH24:MI:SS') as LABEL, ltrim(rtrim(substr(oled, 9, 16))) as VALUE, from rrfh a, rrf b where ltrim(rtrim(substr(oled, 1, 9))) = 'stata kish' and a.xyz = b.xyz – user1466466 Aug 28 '12 at 09:52
  • Also remove the comma after VALUE before from – Adriaan Stander Aug 28 '12 at 09:53
2

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.

Kishor m n
  • 45
  • 1
  • 7
0
update INC.PROV_CSP_DEMO_ADDR_TEMP pd 
set pd.practice_name = (
    select PRSQ_COMMENT FROM INC.CMC_PRSQ_SITE_QA PRSQ
    WHERE PRSQ.PRSQ_MCTR_ITEM = 'PRNM' 
    AND PRSQ.PRAD_ID = pd.provider_id
    AND PRSQ.PRAD_TYPE = pd.prov_addr_type
    AND ROWNUM = 1
)
david
  • 3,225
  • 9
  • 30
  • 43
user2412576
  • 51
  • 1
  • 1
  • 4
-1

This happens every time you insert/ update and you don't use single quotes. When the variable is empty it will result in that error. Fix it by using ''

Assuming the first parameter is an empty variable here is a simple example:

Wrong

nvl( ,0)

Fix

nvl('' ,0)

Put your query into your database software and check it for that error. Generally this is an easy fix

csandreas1
  • 2,026
  • 1
  • 26
  • 48