Difference between Decode and Case?

Answer Posted / vasu

Decode: using for reporting purpose. and it is implemented
by if stmt.
Ex: select decode(job,'CLERK','executive',job) from emp;

Case : implemented by if & elsif condition. it is using
pl/sql equality conditionality.
Ex : select case job='CLERK' then 'executive' else 'no' end
a from emp;

it is also used for multipul colms & multi conditions.

in above stmt a is reffered alias name.

Is This Answer Correct ?    24 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi friends, I am trying to create OLAP connection in IDT. I am getting error "error code:405 METHOD NOT ALLOWED" I am using "http:/olap/msmdpump.dll" I am using ms sql server 2012 -- cube

3289


Migration of Reports from business objects 5.1.5 to samee version in different hardware?

1910


What is top business?

567


Please send me BO certification details and question papers? this is my mail id: valsreenivas@gmail.com

1972


What is the difference between user and versatile user?

585






Explain about a time when you discovered a more efficient way to do a work task?

640


How to restrict password to a user while sending a document in .pdf format

1863


Explain the difference between union and group?

632


Explain which versions are used in the bo dashboard work?

635


How to schedule the report in b.o?

564


WHAT ARE THE META DATA TYPES?WHICH META USING IN BO'S

1691


what is document design in boxi,have u participate in that

1663


How to open a universe with out using the Designer ??

6616


Explain and tell me about a situation where your analysis of a problem was deemed to be incorrect? What would you have done differently?

818


how many reports have u created ? explain a few.

1665