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 / sanjay gupta
Hi Srinu,
you check the query once again..Query is not wrong..
UPDATE emp
SET sal=sal+500
WHERE hiredate IN (SELECT hiredate
FROM emp
HAVING COUNT(*)>1
GROUP BY hiredate
it'll give the same result whether we write count(*) or
count(hiredate)..
But I agree but its better to give count(hiredate)instead of
COUNT(*)...coz it is easier to understand.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are the components of workflow manager?
Describe expression transformation?
How is Source Side push down optimization different to just providing a SQL override in Source qualifier transformation.
Can we create multiple integration service on single repository?
explain any diffcult scenario that u have faced in your experience... or explain any complex maping u have developed?
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.
If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, the target should be loaded as 1 a+b+c or 1 a||b||c, what transformations should be used for this?
Define pmcmd command?
What is the difference between informatica 7.0 and 8.0?
What is decode in informatica?
How can one identify whether mapping is correct or not without connecting session?
How do you take back up of repository?
What is workflow? What are the components of the workflow manager?
How to create a non-reusable instance of reusable transformations?
What is a transaction control transformation?