Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Packages: Is there a way to...
A copy of this was sent to stemp1ar_at_my-deja.com
(if that email address didn't require changing)
On Mon, 14 Jun 1999 18:21:12 GMT, you wrote:
>Hello and Thank you...
>
>What I would like to do is setup a generic package. Is there a way to
>do this, and am I going in the right direction?
>
>Is there a way to test for boolean in an IF statement as written
>below...(o_active := IF( ISNULL(row.end_dt), "Y", "N");)
>
decode .... see below
>------------------------------------------------------------
>CREATE OR REPLACE PACKAGE BODY XYZ AS
>PROCEDURE P_XYZ
> (
> o_id OUT t_id
> , o_desc OUT t_desc
> , o_active OUT t_boolean
> , o_end_dt OUT t_date
> , o_srt_seq_num OUT t_srt_seq_num
> , o_last_maint_dt OUT t_date
> , o_last_maint_user_id OUT t_lupd_user
> )
>
>IS
> CURSOR tbl_cur IS
>
> SELECT id
> , desc
, decode( end_dt, NULL, 'Y', 'N' ) end_dt_string
> , num
> , dte
> , user_id
> FROM table_xyz
>BEGIN
> FOR row IN tbl_cur
> LOOP
> o_id(i) := row.pymt_meth_id;
> o_desc(i) := row.pymt_meth_desc;
o_active(i) := row.end_dt_string;
> o_dte(i) := row.dte;
> o_num(i) := row.num;
> o_dte(i):= row.last_maint_dt;
> o_user_id(i):= row.user_id;
> i := i + 1;
> END LOOP;
>END;
>END;
>
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'... Mirrored (and more current) at http://govt.us.oracle.com/~tkyte/
Current article is "Fine Grained Access Control", added June 8'th
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA--