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
update strategy transformation in informatica
whats the logic to load the lower level of granularity of data to fact table.
What do you mean by blocking transformation?
Dimension Object created in Oracle can be imported in Designer Cubes contain measures
What are connected or unconnected transformations?
Explain how many types of dimensions are available in informatica?
What is mapping debugger?
What does role playing dimension mean?
difference between informatica 8.1.1 and 8.6
if i hv 6 table as source table but can i make 12 as a dim table and 6 as fact table belongs to that src table.
In informatics server which files are created during the session rums?
How many ways are there to create ports?
Explain lookup transformation in informatica
how to construct simple biogas digerter? please show me detail drawing and specification of simple biogas construction?
What is meant by active and passive transformation?