Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is the use of transformation?

947


Please let me know how to make Data masking in informatica..

1665


How to extract sap data using informatica?

987


What are the types of schemas we have in data warehouse and what are the difference between them?

890


explain any diffcult scenario that u have faced in your experience... or explain any complex maping u have developed?

2100


Tell me any other tools for scheduling purpose other than workflow manager pmcmd?

1272


Enlist the differences between database and data warehouse.

1035


What is standalone command task?

1263


Under which circumstances, informatica server creates reject files?

1028


Define mapping and session?

973


What is lookup transformation?

1004


What is the meaning of up gradation of repository?

1899


How you know when to use a static cache and dynamic cache in lookup transformation?

1795


How do you convert single row from source into three rows into target?

1095


What is a node in Informatica?

1004