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


Please Help Members By Posting Answers For Below Questions

Explain sessions. Explain how batches are used to combine executions?

571


What is persistent lookup cache?

576


How can informatica be used for an organization?

621


What are the advantages of informatica?

550


Define filter transformation?

601






hi real timers . iam waiting for ur reply regarding ETL TESTING

1770


How to use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?

667


What is Cognos script editor?

3765


how to construct simple biogas digerter? please show me detail drawing and specification of simple biogas construction?

1939


What is a shortcut and copy in Informatica and how two are different with each other?

652


Explain the aggregator transformation?

600


What is sorter transformation?

556


Tell me about Propagate functions in informatica

501


Can I use same Persistent cache(X.Dat) for 2 sessions running parallely? If it is not possible why?If yes How?

1592


I have two different source structure tables, but I want to load into single target table? How do I go about it? Explain in detail through mapping flow.

612