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 / suraj kedia
Hi Sanjay,
the query u posted is a bit wrong,1st u have to do group by
n then having clause comes n not vise versa. so the final
query will be as below:
UPDATE emp
SET sal=sal+500
WHERE hiredate IN (SELECT hiredate
FROM employees
GROUP BY hiredate
HAVING COUNT(hiredate)>1
)
Hi Srinu,
It doesn't matter whether u write count(*) or
count(hiredate),the answer will always the same but its
better to give count(hiredate) only as it is easier to
understand.
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What do you understand by term role-playing dimension?
what are the deliverables?in your project?
How to create Target definition for flat files?
What is olap (on-line analytical processing?
How to create a non-reusable instance of reusable transformations?
What are the components of the workflow manager?
What is rank transformation in informatica
Is it possible to create multiple domains on a single Informatica server?
Design a mapping to get the pervious row salary for the current row. If there is no pervious row exists for the current row, then the pervious row salary should be displayed as null.
What is a dimensional model?
What are the different clients of powercenter?
Explain lookup transformation source types in informatica
Clarify the utilization of aggregator cache record?
hi,this is satheesh working as pl/sql resource in MNC.i just wanna switch to informatica.Could you please let me know what is the best way to learn informatica.what are the best coaching centres available in chennai?Is there any coaching centre will give me a real time experience? informatica
I want my deployment group to refer an external configuration file, while i deploy in the production environment. How can i achieve it.