Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ORDER BY in sub-select doesn't compile in Pro*C 8.1.6 - why not?

ORDER BY in sub-select doesn't compile in Pro*C 8.1.6 - why not?

From: Zoran Marjanski <zoranm_at_sympatico.ca>
Date: Sat, 02 Jun 2001 23:49:48 GMT
Message-ID: <wYeS6.13420$S2.1037996@newsread2.prod.itd.earthlink.net>

We have Oracle 8i (8.1.6) and Pro*C 8.1.6 pre-compiler and the following SQL is NOT pre-compiling. Pro*C doesn't like the ORDER BY clause in the sub-select. We need the order by in the sub-select to make the rownum clause in the outer select do it's job.

EXEC SQL select order_idbase, order_idsub, line, wskuskuskuid

                    into :order_idbase, :order_idsub, :line
                    from (select order_idbase, order_idsub, line,
wskuskuskuid
                              from ordetail
                              order by wskuskuskuid
                             )
                    where rownum < 10

;
The query however is supported by Oracle 8i and executes just fine in SQL*Plus.

Does anyone know, how to get the pre-compiler to like this syntax with the order by in the sub-select?

Thanks, Zoran. Received on Sat Jun 02 2001 - 18:49:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US