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
 Old Forums
 CLOSED - General SQL Server
 Subquery returned more than 1 value

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-03-17 : 08:26:49
Cory writes "I am running update scripts for the same table in 4 different databases. Structurally the are identicaly, only the data is different. For the first 3 databases, everything went smoothly. Unfortunately, when I tried to run the exact same script on the 4th database, I received this error message:

Server: Msg 512, Level 16, State 1, Procedure tUser_ins, Line 5
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.

Here is the script:

update mhgroup.docusers
set login = 'N'
where USER_PASSWD is null
and login = 'Y'

Any suggestions?

Thanks,
Cory"

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-03-17 : 08:30:29
there isn't any subquery in the script. Maybe in the update trigger ?



KH

Choice is an illusion, created between those with power, and those without.
Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-17 : 08:54:57
Did you post the full query?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

MARINOS
Starting Member

13 Posts

Posted - 2006-03-18 : 07:00:16
must be drop the trigger before run the query
Go to Top of Page
   

- Advertisement -