Geeks Talk

Prepare for your Next Interview




Uniqueness of Decode command?

This is a discussion on Uniqueness of Decode command? within the Oracle forums, part of the Databases category; Dear all, please tell me, what is the advantage of "DECODE" command over the " IF-THEN-ELSE" statement in PL/SQL . We can use " IF-THEN-ELSE" , why we are ...


Go Back   Geeks Talk > Databases > Oracle

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-24-2007
Junior Member
 
Join Date: Jan 2007
Location: Chennai
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
prasathlogu is on a distinguished road
Uniqueness of Decode command?

Dear all,

please tell me, what is the advantage of "DECODE" command over the
" IF-THEN-ELSE" statement in PL/SQL .

We can use " IF-THEN-ELSE" , why we are using "Decode" command?
What is the unique advantage for DECODE command and gimme the
difference between "DECODE" and " IF-THEN-ELSE" statement in pl/sql.

regards,
Prasath.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-25-2007
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 523
Thanks: 1
Thanked 55 Times in 46 Posts
sutnarcha is on a distinguished road
Re: Uniqueness of Decode command?

Check the attachment for my reply.

This code may contain sintax errors. It may not work on PL/SQL. It can be looked at as a psudocode.

Thnx.
Attached Files
File Type: txt nar.txt (584 Bytes, 9 views)
__________________
Lack of WILL POWER has caused more failure than
lack of INTELLIGENCE or ABILITY.

-sutnarcha-

Last edited by sutnarcha : 05-25-2007 at 05:54 AM.
Reply With Quote
  #3 (permalink)  
Old 05-25-2007
Junior Member
 
Join Date: Jan 2007
Location: Chennai
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
prasathlogu is on a distinguished road
Re: Uniqueness of Decode command?

Quote:
Originally Posted by sutnarcha View Post
Check the attachment for my reply.

This code may contain sintax errors. It may not work on PL/SQL. It can be looked at as a psudocode.

Thnx.
Could you pls gimme another example for this and
some more advantages of Decode command over "If-then-else" stmt.

Regards
Reply With Quote
Reply

  Geeks Talk > Databases > Oracle


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Want to know about this command christia Windows 2 11-01-2006 10:09 AM
Can you tell the command christia Unix/Linux 1 09-09-2006 05:00 PM
Can you brief about this command RyanJames Unix/Linux 1 08-31-2006 04:29 PM
Help me with the command joel SQL 1 07-23-2006 12:29 PM
Decode in SQL timmy Oracle 2 07-16-2006 12:20 PM


All times are GMT -4. The time now is 01:35 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved