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 avoid cursors?

Answer Posted / mahima

to avoid cursor use CASE and SET .
to give increment to the employee depending upon the salary

update empsal
set
case when sal between 2000 AND 3000 then sal+1000
when sal between 3000 AND 4000 then sal+2000
end

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a data collection table?

1051


what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

1001


Can one drop a column from a table?

1068


Does a sql server 2005 select statement require a from?

1073


What is mscorsvw.exe - process - microsoft .net framework ngen?

1004


How to create a Master database in SQL server ?

1142


What do you mean by sql server agent?

1042


What are the differences between left join and inner join in sql server?

1156


What is filtered index?

1143


How to compare the top two records using sql?

1414


What is sql server query analyzer?

1102


What are the instances when triggers are appropriate?

1019


How many types of stored procedures are there in sql server?

1057


What are the steps to process a single select statement?

990


Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.

1897