So why didn't the example I posted originally, and the one for 9i, not work? Too many columns in the second select statement? Why does that work in your examples and not mine?
Printable View
So why didn't the example I posted originally, and the one for 9i, not work? Too many columns in the second select statement? Why does that work in your examples and not mine?
because you have more than one column, if that column was using a defined type it probably works
I have told you allready - because your syntax is wrong! With correct syntax it works both in 8.1.7 and in 9i.Quote:
Originally posted by stecal
So why didn't the example I posted originally, and the one for 9i, not work? Too many columns in the second select statement? Why does that work in your examples and not mine?
Your (wrong) syntax:
SQL> select dname, (select empno, mgr from emp) from dept;
The correct syntax for such example - you must use CURSOR expression:
SQL> select dname, CURSOR(select empno, mgr from emp) from dept;