Computing.Net > Forums > Database > sql server update

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

sql server update

Reply to Message Icon

Name: hc54
Date: July 13, 2007 at 14:50:04 Pacific
OS: xp
CPU/Ram: 1gb
Product: dell
Comment:

I am trying to update a field in a sql server table. There are times when I may get multiple records returned in which case they will all need to be updated. I am getting this error: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression

What I don't understand is that the second query listed works fine when multiple records are returned and I don't see any difference in the two.

1. UPDATE table1 SET CHANGEDPOLICY = 'Y' WHERE RTRIM(claim) LIKE 'xxxxx xxx%'

2. UPDATE table2 SET special49 = 'Y' WHERE RTRIM(OCCURNUM) like 'xxxxx%'

number 1 affects 2 rows and number two affects 3 rows. As I said #2 works fine. Please help as everybody in my office has looked at this and we are all stumped.




Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Database Forum Home


Sponsored links

Ads by Google


Results for: sql server update

SQL Server Reporting Services www.computing.net/answers/dbase/sql-server-reporting-services/722.html

SQL Server 2000 Restore www.computing.net/answers/dbase/sql-server-2000-restore/251.html

SQL Server statement www.computing.net/answers/dbase/sql-server-statement/105.html