If sal is null then replace it with min(sal). Can any one
write a query for this in oracle ?
Advance Thanks
Answers were Sorted based on User's Feedback
Answer / madhu
here is the query
update emp set sal =(select min(sal) from emp) where sal is null
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / ramesh 9866930212
select min(decode(sal,null,(select min(sal) from emp))) sal
from emp group by empno;
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / abc
update emp_test set comm=(select min(sal) from emp_test)
where comm is null;
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / amol m
SELECT DECODE(w.salary,NULL,(SELECT MIN(e.salary) FROM
employees e),w.salary) FROM employees w
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / priyank
select (case when sal is null then (select min(sal) from
emp) end) from emp
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / eval
update emp_test set comm=(select min(sal) from emp_test)
where comm is null;
Is This Answer Correct ? | 0 Yes | 0 No |
In a table, 4 person having same salary. How to get Third person record only?
What is difference macros and prompts?
From where we can start or use pmcmd?
The Source coloumns are A,B,C with data row1- 10,20,30 row2- 40,50,60 row3-70,80,90 and so on. In the target I want one coloumn with the following data, Coloumn-X, row1-10,row2- 20,row3-30,row4-40,row5-50 and so on. How to achieve this?
After dragging the ports of 3 sources sqlserver,oracle,informix to single source qualiofier can we map these ports directly to target and how?
My source data like... Empid Name 10 chandra 10 sekhar I am expecting result is Empid Ename 10 Chandrasekhar How can we solve this prob?
What is standalone command task?
HOW DO YOU CONNECT TO REMOTE SERVER ?
I have been working in Informix-4gl for the past 2 years in an MNC company.But I'm interested to work in Business Intelligence tools. Is it possible to change the technology now? I'm really confused, please help me
My source is this year 01/jun/2014 04/may/2015 09/mar/2017 my desired output is day month ye 01 jun 2014 04 may 2015 09 mar 2017 how do i acheive this
Define Update Override?
we have 20 records in source system, when we run for the 1st time, it should load only 10 records into the target, when you run for the second time it should load another 10 record which are not loaded. How do we do that? Can we write a SQL query in source qualifier to do it. This q' is asked in one f the interviews. Please let me know if anyone knows. Thanks