Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Difference between Decode and Case?

Answers were Sorted based on User's Feedback



Difference between Decode and Case?..

Answer / pari

Decode
1.It’s a function
2.can compare only discrete vaules
3.Pl/Sql standards
4.cannot process null

Case
1.It's an Expression
2.can hande range values
3.ANSI Standards
4.Processing time is faster when compared to Decode
5.can process null

Is This Answer Correct ?    52 Yes 11 No

Difference between Decode and Case?..

Answer / judith

Decode
The default operator for comparison is '=',
for e.g select deptno,decode
(deptno,10,'dept10',20,dept20,default)

so if the deptno=10 then the value is replaced by dept10
and so on,

whereas in Case:

we can use any operator other than '=',
for e.g
select deptno,
case when deptno=10 and sal>1000 then 'dept10'
else
'dept20'

Hope the difference is made clear.

Regards,
Judith

Is This Answer Correct ?    33 Yes 8 No

Difference between Decode and Case?..

Answer / 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

Difference between Decode and Case?..

Answer / suman vyas

1) Case Can work with logical operator other than '=' . such as < , > , = < , >=
where Decode performs an equality check only.

2) Decode can work as function inside SQL only,
where Case can work in Pl/Sql as a substitute of IF-THEN-ELSE.

3) Decode can not process Null , where Case can process Null.

4) Case expects datatype Consistency, Decode Dose not.

5) Decode is a function, where Case is a statement.

hope this will give u satisfied Answer for Difference Between CASE AND DECODE.

Thanks
Suman Vyas

Is This Answer Correct ?    7 Yes 0 No

Difference between Decode and Case?..

Answer / satishe

Decode and Case functionwill work in the same way.the only
difference is we can write conditions in side the case
function.
for Ex;
case(if c>d,d...)
decode(job,'clerk'...)

Is This Answer Correct ?    15 Yes 14 No

Difference between Decode and Case?..

Answer / gurujothi

*CASE can only be used inside the SQL statement where as CASE can be used anywhere even as a parameter of a function or procedure.
*Decode can do equality check only but Case can do more logic comparisons such as <,>etc.,
*The Case will handle NULL differently

Is This Answer Correct ?    4 Yes 3 No

Difference between Decode and Case?..

Answer / zeya.ocp

CASE Expr make u use IF-THEN-ELSE logic in sql statements without to invoke procedure.It complies with ANSI SQL.
DECODE function decode an expr in a way similar to IF-THEN-ELSE logic that is used in various languages.it facilitate conditional inquiries.

Is This Answer Correct ?    2 Yes 1 No

Difference between Decode and Case?..

Answer / neeraj

Can anyone explain me Null value handle by Case & Decode with Example.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Business Objects Interview Questions

how to create metric universe ?

0 Answers   TCS,


What are universe parameters?

6 Answers  


Aliases and Contexts Which once will give the better performence when resolve the loops?

3 Answers   HCL,


Pls Explain about the different between 6.5 & Xi R2

2 Answers   IBM,


when I am trying to schedule the report its running faster then I tried to run it manually?? why is it so that there is difference of time between scheduling and manual run for report

2 Answers  


What is the difference in creating filters in designer and business objects?

0 Answers  


1.what is context? How u create? With example.

2 Answers   Polaris, TCS,


What is the difference between the prompt and cascading prompt

2 Answers  


GENARALLY HOW MANY REPORTS ARE CREATE FOR EACH ONE ?PLZ EXPLAIN AFEW FOR AUTOMOBILE PROJECTS?

4 Answers  


what is the difference between add link and include link in BO? Explain me with a scenario when to go for add link and when to go for include link?

2 Answers   HCL, IBM,


REGULAR CLASSES for OBIEE Reporting(RPD, Answer, BI Publisher) is Starting From Tuesday, 25th Oct, 7:00 AM IST

1 Answers  


Is it possible to create a new calendar using BO? Ex:- Wants to create a calendar where the year starts with the 1feb - 25Feb. Next month from 26Feb - 14Mar.

1 Answers  


Categories