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...

how to Update table Sales_summary with max(sales) data from
table sales_dataTable 1. sales_data table Table 2.
Sales_summary

Region sales Region sales
N 500 N 0
N 800 W 0
N 600
W 899
W 458
W 900

I want the Sales_summary After Update like this
Region Sales
N 800
W 900


Answer Posted / ajitnayak

update sales_sum s set sales =
(select max(sales) from sales_sum s2 where s.REGIN = s2.REGIN group by REGIN );

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I run a pl sql procedure in sql developer?

911


What is the least restrictive isolation level? : Transact sql

994


Can one improve the performance of sql*loader? : aql loader

980


Does sqlite need a server?

992


What are sql ddl commands?

1018


Is sql database free?

923


Can we use pl sql in mysql?

959


What are the different parts of a package?

1040


Is sqlexception checked or unchecked?

917


What is the use of double ampersand (&&) in sql queries? Give an example

1077


What is procedure in pl sql?

978


Can we insert data in view?

887


What is hibernate and its relation to sql?

1065


What is use of term?

1007


What is cursor status?

1135