BUG: AV If Update on a Column with CASE and Aggregate FunctionsLast reviewed: December 26, 1997Article ID: Q178442 |
The information in this article applies to:
SYMPTOMSPerforming an update on a column leads to an access violation if both of the following conditions are true:
This command did not return data, and it did not return any rows DB-Library Process Dead - Connection Broken WORKAROUNDTo work around this problem, do either of the following:
update titles
set titles.royalty = (select (case 1
when 0 then avg(royalty)
when 1 then avg(royalty/2)
else avg(royalty/3)
end)
from roysched r
where r.title_id = t.title_id)
from titles t
Try the following query:
update titles
set titles.royalty = (select avg(case 1
when 0 then royalty
when 1 then royalty/2
else royalty/3
end)
from roysched r
where r.title_id = t.title_id)
from titles t
STATUSMicrosoft has confirmed this to be a problem in SQL Server version 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional query words: AV
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |