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

Explain what three things do you consider to be the most important factors for a manager?

559


How to generate the report from excel sheet?

590


Explain are data mart and data warehouse normalized or denormalized? Do both of them exist in?

610


what is xcelsius architecture?

3752


How many universes can be created in a project?

602






What are all difference between business objects 6.5 and xi r2?

613


I have 2 doubts regarding the "Input Control" functionality in BI4: 1) Can the Input Controls in BI4 be manipulated? I mean, can we change the IC display as BOLD or change the values from Italics to regular? Or change the colors? 2) How to get hierarchy type control in IC? Let's say my first IC is for Country and second is for State. If I select a particulat country from Ist IC,second one should show me states belonging to selected country. Is that possible? Thanks in advance!!!

1763


What is top business?

573


Its regarding Javascript coding for customization in BI4 reports. We need to have all the options disabled in the report except the option to Export(save the report in computer in Excel/pdf formats). I am able to hide TopBar,TabBar,Left Navigation etc but I need "Export" option to be displayed to the users in Read mode. Can this selective "hiding" be achieved?

1491


BO Security (creating the restriction sets in Universe and applying on selected groups or users) or Database security (Creating the tables in database insrting the user details in that tables and giving conditions in self restricting joins in Universe )Which Security will improve the performance of the reports and for best practices ? I am thinking BO Security will give the better performance, could you please share your thoughts on this please... Thanks...

1729


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

628


What are the data types present in bo? What happens if we implement view in the designer and report?

624


Did you face any problems while creating reports? Name? Solutions?

3266


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

619


Explain about a tricky situation for which you found a very simple solution?

549