Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Altering the ORDER BY clause based on a parameter
jeremy wrote:
> In article <An00j.28383$mv3.7435_at_newsfe10.phx>, Ana C. Dent says...
>
>
> >
> > Dynamic SQL
> >
> Ok I know is possible with dynamic SQL, is there a way of achieving
> without using dynamic SQL?
>
> If I understand correctly, dynamic sql is less efficient (has to be
> parsed every time?) so am looking for the most efficient solution.
Dynamic SQL is about the same as static in 10g for single-row & bulk selects. I'm not sure what the difference would be with your FOR loop as 10g will bulkify that in the background, so that's something you'll need to test. Change it to a bulk collect though & dynamic will be fine (once you get on 10g).
-- Preston.Received on Mon Nov 19 2007 - 02:53:34 CST
![]() |
![]() |