Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: dynamic sql in PL/SQL
Sorry,mucked up the brackets in that example...
> select *
> from emp
> order by
> decode(:order_by_bind_variable,'NAME',ename,'ID',lpad(to_char(empno,30)))
Should read :
select *
from emp
order by
decode(:order_by_bind_variable,'NAME',ename,'ID',lpad(to_char(empno),30))
Mike Received on Wed Mar 23 2005 - 14:41:25 CST
![]() |
![]() |