Re: Using dynamic order by clause(using Decode) in Forms 4.5

From: Peter Brenner <pbrenner_at_charlotte.infi.net>
Date: 1998/01/07
Message-ID: <34B40902.54DE4ACA_at_charlotte.infi.net>#1/1


Syntax wise you statement is correct, however, to do any type of dynamic sql within PL/SQL you must use the DBMS_SQL built-in package.

HTH smitas_at_meghdoot.mastek.com wrote:

> Syntax is
>
> SELECT fld_name1,fld_name2
> FROM table_name
> ORDER BY DECODE(var_name,1,fld_name1,2,fld_name2);
>
> It runs under SQL*PLUS. When we write this code in PL-SQL editor of Forms
> 4.5 it doesn't give any compilation error. But at runtime it gives ORA
> error saying Invalid field name.
>
> Please reply soon. It is very urgent.
>
> Thanks.
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Received on Wed Jan 07 1998 - 00:00:00 CET

Original text of this message