Home » SQL & PL/SQL » SQL & PL/SQL » ORA-00936: Missing Expression
ORA-00936: Missing Expression [message #306553] Fri, 14 March 2008 12:01 Go to next message
pks2141
Messages: 2
Registered: March 2008
Location: Boca Raton
Junior Member
Here is the SQL. I think this should work but I am getting this error.

SELECT CSQ_EXCEL_CALL_LINE_GRAPH.AGENT, (CTC_OPP+CTP_OPP), (CTC_DEFECT+CTP_DEFECT), CSQ_EXCEL_CALL_LINE_GRAPH.DETAIL_ID, CSQ_EXCEL_CALL_LINE_GRAPH.CALL_DATE, CSQ_EXCEL_CALL_CTQ.CALL_DATE
FROM POINT.CSQ_EXCEL_CALL_CTQ CSQ_EXCEL_CALL_CTQ, POINT.CSQ_EXCEL_CALL_LINE_GRAPH CSQ_EXCEL_CALL_LINE_GRAPH, POINT.INFO INFO
WHERE CSQ_EXCEL_CALL_CTQ.DETAIL_ID = CSQ_EXCEL_CALL_LINE_GRAPH.DETAIL_ID AND CSQ_EXCEL_CALL_LINE_GRAPH.AGENT = INFO.FULLNAME__ AND CSQ_EXCEL_CALL_CTQ.CALL_DATE = CSQ_EXCEL_CALL_LINE_GRAPH.CALL_DATE AND ((INFO.USERID Like 'CS%') AND (CSQ_EXCEL_CALL_LINE_GRAPH.SAMPLE_TYPE='Quality Monitoring') AND (INFO.STATUS='ISActive'))
GROUP BY CSQ_EXCEL_CALL_LINE_GRAPH.AGENT, (CTC_OPP+CTP_OPP), (CTC_DEFECT+CTP_DEFECT), CSQ_EXCEL_CALL_LINE_GRAPH.DETAIL_ID, CSQ_EXCEL_CALL_LINE_GRAPH.CALL_DATE, CSQ_EXCEL_CALL_CTQ.CALL_DATE
HAVING (CSQ_EXCEL_CALL_LINE_GRAPH.CALL_DATE Between [Enter Begin Date] And [Enter End Date])
Re: ORA-00936: Missing Expression [message #306560 is a reply to message #306553] Fri, 14 March 2008 12:40 Go to previous messageGo to next message
pablolee
Messages: 2882
Registered: May 2007
Location: Scotland
Senior Member
This looks like Access SQL
Re: ORA-00936: Missing Expression [message #306561 is a reply to message #306553] Fri, 14 March 2008 12:41 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Post the actual error you are getting something like this
  1  with t
  2  as
  3  (select 1 a, 2 b from dual
  4   union all
  5  select 3 , 4 from dual
  6  )
  7  select a, b, a+b from t
  8  group by a, b, a+b
  9* having (a)
SQL> /
having (a)
         *
ERROR at line 9:
ORA-00920: invalid relational operator

For how to do it read the forum guidelines.

Regards

Raj
Re: ORA-00936: Missing Expression [message #306562 is a reply to message #306553] Fri, 14 March 2008 12:46 Go to previous messageGo to next message
pablolee
Messages: 2882
Registered: May 2007
Location: Scotland
Senior Member
Actually, I tell a lie, it looks like a combination of Access SQL and Oracle SQL.
Re: ORA-00936: Missing Expression [message #306568 is a reply to message #306553] Fri, 14 March 2008 12:59 Go to previous messageGo to next message
pks2141
Messages: 2
Registered: March 2008
Location: Boca Raton
Junior Member
Actually I built this through MS Query against an oracle database.

The Error code does not give me a line but it does read exactly as the subject of this thread.

I can run this query if I specify a start and end date in date format in the parameter. What does not work is when I use the definable parameter of [enter start date], [Enter End Date]

I hope this helps.
Re: ORA-00936: Missing Expression [message #306572 is a reply to message #306568] Fri, 14 March 2008 13:42 Go to previous message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
SQL> select 1 from dual where trunc(sysdate) = [Enter Date];
select 1 from dual where trunc(sysdate) = [Enter Date]
                                                   *
ERROR at line 1:
ORA-00936: missing expression

SQL> select 1 from dual where trunc(sysdate) = to_date('&1','dd-mm-yyyy');
Enter value for 1: 14-03-2008
old   1: select 1 from dual where trunc(sysdate) = to_date('&1','dd-mm-yyyy')
new   1: select 1 from dual where trunc(sysdate) = to_date('14-03-2008','dd-mm-yyyy')

         1
----------
         1

SQL> /
Enter value for 1: 13-03-2008
old   1: select 1 from dual where trunc(sysdate) = to_date('&1','dd-mm-yyyy')
new   1: select 1 from dual where trunc(sysdate) = to_date('13-03-2008','dd-mm-yyyy')

no rows selected


Regards

Raj

[Updated on: Fri, 14 March 2008 13:43]

Report message to a moderator

Previous Topic: SQL to Rebuild the references of a table
Next Topic: dbms_utility.table_to_comma output
Goto Forum:
  


Current Time: Fri Feb 14 10:02:40 CST 2025