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 -> Re: ORDER BY in sub-select doesn't compile in Pro*C 8.1.6 - why not?

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

From: Chris Wiss <chris_at_purecarbonnospam.com>
Date: Tue, 5 Jun 2001 14:51:19 -0400
Message-ID: <9fj9co$1ku1$1@msunews.cl.msu.edu>

This construct seems unnecessarily complex. Why not simply use the following:

 EXEC SQL select order_idbase, order_idsub, line, wskuskuskuid

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

Chris Weiss

"Zoran Marjanski" <zoranm_at_sympatico.ca> wrote in message news:wYeS6.13420$S2.1037996_at_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 Tue Jun 05 2001 - 13:51:19 CDT

Original text of this message

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