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 / suraj kedia

Hi Sanjay,
the query u posted is a bit wrong,1st u have to do group by
n then having clause comes n not vise versa. so the final
query will be as below:

UPDATE emp
SET sal=sal+500
WHERE hiredate IN (SELECT hiredate
FROM employees
GROUP BY hiredate
HAVING COUNT(hiredate)>1
)


Hi Srinu,
It doesn't matter whether u write count(*) or
count(hiredate),the answer will always the same but its
better to give count(hiredate) only as it is easier to
understand.

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is deployment group?

1124


Hi, There is a session in my workflow which is running for a long time, atlast we found the cause is the missing index. My session is running via a stored procedure. Can I create an Index on the table which the stored procedure is using while my session is running? Please suggest. My Informatica version is PC 8.0.6 My Oracle APPS is 11.5.3. Thanks,

7113


Design a mapping to load the cumulative sum of salaries of employees into target table?

1420


What is transformation?

1049


hi,this is satheesh working as pl/sql resource in MNC.i just wanna switch to informatica.Could you please let me know what is the best way to learn informatica.what are the best coaching centres available in chennai?Is there any coaching centre will give me a real time experience? informatica

2027


Define joiner transformation?

980


To import the flat file definition into the designer where should the flat file be placed?

1004


How can we use mapping variables in informatica?

999


What you know about transaction control transformation?

934


What are the components of Informatica? And what is the purpose of each?

980


What is substr in informatica?

1131


What is a stored procedure transformation?

982


Reusable transformation and shortcut differences

1777


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

1093


How many types of sessions are there in informatica.please explain them?

1110