In EMP table, for those emp whose Hiredate is same, update
their sal by "sal+500" or else for others keep the sal as it
is, how to do it by SQL query
Answer Posted / sukanta
update emp a set a.sal=a.sal+500 where a.hiredate in(select
max(b.hiredate) from emp b group by b.hiredate having
count(b.hiredate)>1);
or
update emp a set a.sal=a.sal+500 where a.hiredate=(select
max(b.hiredate) from emp b where a.hiredate=b.hiredate group
by b.hiredate having count(b.hiredate)>1);
above is Posted By
Sukanta
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
I have 10 columns in a flat file and 10 rows corresponding to that columns. I want column number 5 and 6 for last five records. In unix as well as informtica.
lookup transformation with screenshots
Partition, what happens if the specified key range is shorter and longer
if we have a delimiters at unwanted places in a flat file how can we over come those.
how many types of dimensions are available in informatica?
what is degenerated dimension?
What is a standalone command task?
How can we store previous session logs?
What is the benefit of partitioning a session?
What are batches?
Explain the use of aggregator cache file?
How many ways are there to create ports?
How to join three sources using joiner? Explain though mapping flow.
Global and Local shortcuts. Advantages.
How to go to the older version for a mapping?