Query works in SQL Developer but not in Oracle APEX
ti3rFeb 8 2013 — edited Feb 8 2013The query below runs and produces the correct result in SQL Developer, but when I try to put it into a PL/SQL process in Apex I get the error shown. There is no semi-colon at the end of the query in APEX.
The error is:
ORA-06550: line 10, column 54: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 2, column 1: PL/SQL: SQL Statement ignored ORA-06550: line 11, column 21: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ( begin case declare end exception exit for goto if loop mod null pragma raise return select update while with.
The query is:
SELECT *
FROM
(SELECT *
from T3_LEADS
WHERE
(SYSDATE - Last_Mailed_Date) > 60 OR Last_Mailed_Date is null
)
WHERE MARKET_ID = 'Salt_Lake_City' AND rownum <= 100