Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 UPDATE problem

Author  Topic 

acko
Yak Posting Veteran

52 Posts

Posted - 2004-06-28 : 08:25:17
Hi evryone
I have the folowing problem
I have two columns id (varchar 20) and parent(varchar 20) in table adreses

Table has 20000 rows and some values in parent column are *
I want those rows to change to x

So this query works fine:

select parent from adreses where parent='*'

but the updete query return error:
update adreses
set parent='x'
where parent= '*'

This is error:
Server: Msg 512, Level 16, State 1, Procedure TR_PromenaAdresnihPodataka, Line 13
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.

Why???
Thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2004-06-28 : 08:30:38
You have a trigger on the table which does not cope with multi-row updates.
Either disable or fix the trigger.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

acko
Yak Posting Veteran

52 Posts

Posted - 2004-06-29 : 02:43:53
thans a lot
alex
Go to Top of Page
   

- Advertisement -