Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: HELP !!! scrpt works with sql plus but not in a procedure
It may not be the real fix but you need a space before 'RECEIVED'
on line 3.
line 3: SUM(INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_QUANTITY) RECEIVED.
Another thing: you don't need to say ALL in your select. ALL is a default.
-----Original Message-----
Sent: Wednesday, June 13, 2001 5:52 PM
To: Multiple recipients of list ORACLE-L
I have this script that works fine in sql plus but when I attach it to a procedure in my report it gives me an error
"error 101 Encountered a symbol SELECT when expecting one of the
following"
The error surfaces when the bolded line (choosing the date) is included in
the script.
What is the possible fix for this?
INSERT INTO AWW_ISSUED SELECT ALL INV.MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID, SUM(INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_QUANTITY)RECEIVED FROM INV.MTL_MATERIAL_TRANSACTIONS WHERE (INV.MTL_MATERIAL_TRANSACTIONS.ORGANIZATION_ID=3 AND INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_TYPE_ID IN (1, 31, 32,33,
AND INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_QUANTITY > 0) AND INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE BETWEEN'01-JUN-01' AND
AND INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE BETWEEN (SELECT TO_DATE('01' || SUBSTR(TO_CHAR(SYSDATE),3,9)) FROM DUAL) AND(SELECT
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Mark Liggayu
INET: markliggayu_at_allweatherwindows.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Jun 13 2001 - 16:10:59 CDT