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

How to sort the dynamic objects alphabetically on the Universe based on and SQL Server

1808


What is thumbnail?

572


what will be the contents for a functional requirements specifications

1776


What we need to discuss with designer before starting the universe designing.

1811


can anybody tell me about complicated object you have created

2747






Explain is there any default username & pwd for bo designer & supervisor?

589


What is the difference between user and versatile user?

571


Hi I'm using data federator.I would like to know if it allows select statment in where clause.For example: SELECT Employee, company, orgunit FROM TAB_BIG WHERE employee IN (Select TAB_SMALL.employee FROM TAB_SMALL WHERE flag = X ) bye

1424


What is a bo repository?

584


What Is Snow Flake Schema?

662


Explain what sort of existing documents should business analysts refer to when starting on a new project?

595


Which versions are used in the bo dashboard work?

590


Is there any tool that can compare two unvs / two rpts , built using bo 5.1 / bo 6.5?

501


What is aggregate table and aggregate fact table ... Any examples of both?

604


1. 101 vinay hyderabad 123 naresh usa 152 singh delhi 101 vinay usa 123 naresh mumbai 156 raju chennai From the above data we need to retrive current data in a report ? how and explain in detail ?

5959