Forum OpenACS Q&A: Getting Error PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:

Hi Everyone. i am gettin the above error when running the query only in Oracle 8.1 but in Oracle 9 its working fine. can any one help me out..

SELECT
TRUNC(ACD.CONVERSION_END_TIME) AS "Date",
ACB.PART_NBR AS "Part#",
ACB.PART_DESCRIPTION AS "Description",
(SELECT
COUNT(1)
FROM
ABANDON_CONVERSION_BOM ACB1
WHERE
TRIM(ACB1.PART_STATUS) = L_PARTS_ADDED_TO_INV AND TRIM(ACB.PART_NBR) = TRIM(ACB1.PART_NBR)
group by
TRIM(ACB1.PART_STATUS) AS "Added_to_Inventory",
(SELECT
COUNT(1)
FROM
ABANDON_CONVERSION_BOM ACB1
WHERE TRIM(ACB1.PART_STATUS) = L_PARTS_ADDED_TO_UNIT AND TRIM(ACB.PART_NBR) = TRIM(ACB1.PART_NBR)
group by TRIM(ACB1.PART_STATUS)) AS "Added_to_Abandon",
(SELECT COUNT(1) FROM ABANDON_CONVERSION_BOM ACB1 WHERE TRIM(ACB1.PART_STATUS) = L_PARTS_SCRAPPED AND TRIM(ACB.PART_NBR) = TRIM(ACB1.PART_NBR) group by TRIM(ACB1.PART_STATUS)) AS "Parts_Scrapped"
FROM
IIBKQ.ABANDON_CONVERSION_DETAIL ACD,
IIBKQ.ABANDON_CONVERSION_BOM ACB
WHERE
TRUNC(ACD.CONVERSION_END_TIME) BETWEEN L_START_DATE AND L_END_DATE
AND
TRIM(ACD.LAYIN_SERIAL_NO) = TRIM(ACB.LAYIN_SERIAL_NO)
ORDER BY
ACD.CONVERSION_END_TIME;

yaknow something (and this is mostly to forums maints), people who post code and people who read posted code could really use the ability to indent
Collapse
3: indent code with pre (response to 2)
Posted by Andrew Piskorski on
Jim, that's what "pre" tags are for in HTML. You just have to actively choose to use them... His SQL above is actually indented acceptably in the HTML source, but that won't show up when rendered unless the poster chooses to post in format "fixed with" or "HTML" (and add some tags manually) rather than "enhanced text" or "plain text".