i am having comm in emp table and i want to display 0 when
comm =null and -10 if comm= value
Answers were Sorted based on User's Feedback
Answer / shaik
select e.*,decode(comm,null,0,-10) new_comm
from emp e
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / siva
select nvl2(comm,-10,0) "New Comm" from employees;
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / prajakta
select case when comm is null then 0 else -10 end from emp
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / s.rajeshkumar
select nvl2(comm,0,-10) "New Comm" from employees;
| Is This Answer Correct ? | 7 Yes | 6 No |
Answer / swati
update emp set comm =
case
when comm is null then 0
else
10
end
| Is This Answer Correct ? | 1 Yes | 4 No |
What Are Cross Validation & Adi?
When a user process fails, what background process cleans up after it?
Explain the payment term in ar. : oracle accounts receivable
whats the difference between join command and Cartesian product using example?
Explain accounting for invoice in advance and arrears. : oracle accounts receivable
what is the difference b/w oracle8i and oracle9i
A Table has 10,000 records,How can i get latest 10 dates from the table.so that i can only store those 10 records in to my Resultset Object,to reduce load on my app?
can u give guidance abt packages of plsql
1.In a table Gender is a column in that male and female are the two data.In a single statement i have to modify all male to female and all female to male vice versa. 2.In a single query i need the count of male data,count of female and total count
A scenario for amount correction & how to use amount correction functionality in AP invoices
8. Supporting AP, AR and GL?
the user should know to which database he is connected currently in oracle