Updating multiple rows

Rated 3.80/5 based on 519 customer reviews

When SET ANSI_PADDING OFF then CHAR data types are padded with spaces, VARCHAR data types have trailing spaces removed, and VARBINARY have trailing zeros removed.

Here is its table structure: Let’s assume we want to the city for every sales person to Ann Arbor.I am trying to write an update query with this as the basic concept: UPDATE Table1SET Flag Entity = 0WHERE (ID = 1) or (ID =2)I get an Execution error stating that the subquery cannot return more than one value if I use =. -- Paul Fleming At best you can say that one job may be more secure than another, but total job security is an illusion. ----------------------------------------------------------------------------------Your lack of planning does not constitute an emergency on my part...unless you're my manager..a director and above..a really loud-spoken end-user.. Jack Corbett Consultant Straight Path Solutions Dont let the good be the enemy of the best. The code you posted doesn't have a sub-query, and an UPDATE statement cannot be a subquery.-- Rod at work Check out these links on how to get faster and more accurate answers: Forum Etiquette: How to post data/code on a forum to get the best help Need an Answer? You Need a Question How to Post Performance Problems Crosstabs and Pivots or How to turn rows into columns Part 1Crosstabs and Pivots or How to turn rows into columns Part 2 I know that code doesn't have a subquery, I stated that I also tried a subquery using where exists.

Leave a Reply