ORA-093: SQL command not properly ended [message #10787] |
Tue, 17 February 2004 06:21 |
Bob Bemmels
Messages: 1 Registered: February 2004
|
Junior Member |
|
|
I receive this error when running this query. Any idea what I'm doing wrong?
strSQL = "SELECT ORDER_DETAIL_HISTORY.PROMISE_DATE, ORDER_HEADER_HISTORY.CUST_NAME, ORDER_HEADER_HISTORY.PROJ_NAME, ORDER_DETAIL_HISTORY.ORDER_NO, ORDER_DETAIL_HISTORY.LINE_NO, ORDER_DETAIL_HISTORY.ITEM_NO,
ORDER_DETAIL_HISTORY.ORDER_QTY, (ORDER_DETAIL_HISTORY.Unit_Price_Amt*ORDER_DETAIL_HISTORY.Order_Qty) AS GRS_SLS
FROM ORDER_DETAIL_HISTORY INNER JOIN ORDER_HEADER_HISTORY ON ORDER_DETAIL_HISTORY.ORDER_NO = ORDER_HEADER_HISTORY.ORDER_NO
WHERE ORDER_DETAIL_HISTORY.PROMISE_DATE Is Not Null AND ORDER_HEADER_HISTORY.CUST_NAME Not Like PLT 19' AND ORDER_DETAIL_HISTORY.LINE_NO <> 0 AND ORDER_DETAIL_HISTORY.STATUS_CODE = 'CHD' AND ORDER_DETAIL_HISTORY.SALES_REP1 In ('625','1031','711','838','139','1035') ORDER BY ORDER_DETAIL_HISTORY.PROMISE_DATE"
|
|
|
Re: ORA-093: SQL command not properly ended [message #10789 is a reply to message #10787] |
Tue, 17 February 2004 07:56 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
Why is this dynamic SQL? I am not seeing any place you are substituting a table or column name.
There are various syntatical problems here (double quotes around entire string, missing quotes within, all single quotes within should be double single quotes.
|
|
|
Versions [message #10790 is a reply to message #10787] |
Tue, 17 February 2004 09:12 |
Renu
Messages: 7 Registered: February 2002
|
Junior Member |
|
|
This website is very helpful to me and my friends.
We are very thankful for that.
I want to know clearly the additional features added to each version of the oracle.
I mean the difference between oracle version 7.3 and 8.0 and 8i and so on
|
|
|