Re: Decode in PL/Sql

2001-05-17 Thread Igor Neyman

Gyula,

I understand, that you want to apply DECODE function to some local variables
in your pl/sql block (and not to some columns in some table).

The trick is: you can always run DECODE() against 'dual' table:

select DECODE(base_expr, compare1, value1, compare2, value2,... default )
into local_variable_out from dual;

In this case 'base_expr' does not have to reference any column in any table.

Igor Neyman, OCP DBA
Perceptron, Inc.
(734)414-4627
[EMAIL PROTECTED]


- Original Message -
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 5:26 AM


> Hi Gurus !
>
>
> Is there any function that can be used in PL/SQL and  just works the way
as
> DECODE does in Sql?
>
> Thanks in Advance
>
> Gyula
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Andor, Gyula
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Igor Neyman
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



FW: Decode in PL/Sql

2001-05-17 Thread Raymond Lee Meng Hong

How about those like NVL , and others

-Original Message-
Sent: Thursday, May 17, 2001 5:26 PM
To: Multiple recipients of list ORACLE-L


Hi Gurus !


Is there any function that can be used in PL/SQL and  just works the way as
DECODE does in Sql?

Thanks in Advance

Gyula
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Andor, Gyula
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Raymond Lee Meng Hong
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Decode in PL/Sql

2001-05-17 Thread FOX, Simon

Feuerstein recommends replacing with IF statements.  Page 517 Oracle PL/SLQ
Programming.

Simon Fox

Room 205
Rail House
Gresty Road
CREWE
Cheshire
CW2 6EA
England

01270 533997

-Original Message-
Sent: 17 May 2001 10:26
To: Multiple recipients of list ORACLE-L


Hi Gurus !


Is there any function that can be used in PL/SQL and  just works the way as
DECODE does in Sql?

Thanks in Advance

Gyula
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Andor, Gyula
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


___
This email is confidential and intended solely for the use of the 
individual to whom it is addressed. Any views or opinions presented are 
solely those of the author and do not necessarily represent those of 
Sema. 
If you are not the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing, or 
copying of this email is strictly prohibited.

If you have received this email in error please notify the Sema UK
Helpdesk by telephone on +44 (0) 121 627 5600.
___
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: FOX, Simon
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Decode in PL/Sql

2001-05-17 Thread Andor, Gyula

Hi Gurus !


Is there any function that can be used in PL/SQL and  just works the way as
DECODE does in Sql?

Thanks in Advance

Gyula
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Andor, Gyula
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).