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 do you understand by term role-playing dimension?

1117


what are the deliverables?in your project?

2194


How to create Target definition for flat files?

1283


What is olap (on-line analytical processing?

1110


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

1170


What are the components of the workflow manager?

1182


What is rank transformation in informatica

1231


Is it possible to create multiple domains on a single Informatica server?

1289


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.

1344


What is a dimensional model?

1033


What are the different clients of powercenter?

1115


Explain lookup transformation source types in informatica

1151


Clarify the utilization of aggregator cache record?

1044


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

2151


I want my deployment group to refer an external configuration file, while i deploy in the production environment. How can i achieve it.

2113