Subquery in ProC
600485Sep 28 2007 — edited Dec 27 2007I have a cursor with a subquery in the select statement, like this:
SELECT t1.blah1,
t2.blah2,
(SELECT t3.blah3
FROM table3 t3)
FROM table1 t1,
table2 t2
WHERE ......
This works fine in SQL/Plus. When I put this cursor into a ProC program I get a compilation error like this:
Error at line xxx, column xx in file xxx.pc
(SELECT t3.blah3
.....................1
PCC-S-02201, Encountered the symbol "t3" when expecting one of the following:
( ) * + - / . @ | at, day, hour, minute, month, second, year,
Is a subquery within a 'select' statement is illegal in ProC? This same program has cursors with subqueries in a 'where' clause and even within a 'from' section, and those work fine.
Help -- I'm all Friday stoopid.