DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Select Query in Select List

  1. #11
    Join Date
    May 2002
    Posts
    2,645
    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?

  2. #12
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    because you have more than one column, if that column was using a defined type it probably works

  3. #13
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    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?
    I have told you allready - because your syntax is wrong! With correct syntax it works both in 8.1.7 and in 9i.

    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;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width