Computing.Net > Forums > Database > sql server update

sql server update

Reply to Message Icon

Original Message
Name: hc54
Date: July 13, 2007 at 14:50:04 Pacific
Subject: sql server update
OS: xp
CPU/Ram: 1gb
Model/Manufacturer: 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.



Report Offensive Message For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: sql server update

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software