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 / guest

update emp a set a.sal=a.sal+500 where a.hiredate in(select
max(b.hiredate) from emp b group by b.hiredate having
count(b.hiredate)>1);

or

update emp a set a.sal=a.sal+500 where a.hiredate=(select
max(b.hiredate) from emp b where a.hiredate=b.hiredate group
by b.hiredate having count(b.hiredate)>1);

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to join three sources using joiner?

556


What is informatica powercenter repository?

702


Describe the impact of several join conditions and join order in a joiner transformation?

632


What is workflow manager?

562


i have a data in my source as a flat files what test i have to perform the next step can any body help to me

1689






what are the deliverables?in your project?

1642


What is a mapplet/worklet in informatica?

676


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

1606


Define the various join types of joiner transformation?

552


How to create different types of slowly changing dimensions (SCD) in informatica using the mapping wizard?

614


what are the Methods For Creating Reusable Transformations?

639


can anyone explain me about retail domain project in informatica?

7413


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

590


Explain is there any way to read the ms excel datas directly into informatica? Like is there any possibilities to take excel file as target?

624


What are the differences between oltp and olap?

539