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
Explain the types of lookup transformation?
What is substr in informatica?
What is informatica worklet?
How to load a Dimension ? and how to load a fact table?
in reporting we add some new objects,how we get the count of the newly added objects to the report
what are the deliverables?in your project?
What is the fact table?
Explain the informatica workflow?
How big was your fact table
How do we call shell scripts from informatica?
have u done any performance tuning? how u ll do?
What is resilience time?
How to use procedural logic inside infromatica?
5. Consider the following products data which contain duplicate rows. A B C C B D B Q1. Design a mapping to load all unique products in one table and the duplicate rows in another table. The first table should contain the following output A D The second target should contain the following output B B B C C
What does “tail –f” command do and what is its use as an Informatica admin.