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 are the components of workflow manager?

1074


Describe expression transformation?

1112


How is Source Side push down optimization different to just providing a SQL override in Source qualifier transformation.

1767


Can we create multiple integration service on single repository?

1174


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

2132


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.

1276


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?

10123


Define pmcmd command?

1028


What is the difference between informatica 7.0 and 8.0?

991


What is decode in informatica?

1123


How can one identify whether mapping is correct or not without connecting session?

1429


How do you take back up of repository?

1138


What is workflow? What are the components of the workflow manager?

1107


How to create a non-reusable instance of reusable transformations?

1098


What is a transaction control transformation?

1181