Whenever I run this query Iget the following error message. Can anyone tell me why. I get the same error with or without the "Distinct"
set Clients.Siccode = (Select distinct updateSIC.siccode
where Clients.accountnumber = updateSIC.accountnumber)
Server: Msg 512, Level 16, State 1, Line 1
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.
inner join --Dups
group by accountnumber
having count(*) > 1) Dups
on updateSIC.accountnumber = Dups.accountnumber
Last edited by blindman; 01-13-05 at 10:48.
If it's not practically useful, then it's practically useless.