Y
ycluo
Unregistered / Unconfirmed
GUEST, unregistred user!
查询内并行度导致服务器命令(进程 ID #158)死锁。请重新运行该查询,并在查询中用查询暗示选项 (maxdop 1) 去掉查询内并行度。 ( 积分: 10 )<br />如上所述:<br>select a.*,OutMyUnit=(select UnitName from Mkt_Unit where UnitNo=A.OutUnit), <br>InMyUnit=(select UnitName from Mkt_Unit where UnitNo=A.InUnit), <br>b.techname OutTechName,c.TechName InTechName,d.CorpPn,d.Rev , <br>OutArea=cast((CASE UPPER(a.OutUnit) WHEN 'WP' THEN <br>CASE WHEN d.WplAry=0 THEN a.OutQty*d.AryPcs*d.QuotArea ELSE a.OutQty*d.WplAry*d.AryPcs*d.QuotArea END <br>WHEN 'PNL' THEN a.OutQty*d.QuotArea <br>WHEN 'PCS' THEN a.OutQty*d.QuotArea END) as numeric(14,4)) <br> from pro_passoverrec a <br> left join pub_TechInfo c on a.InTechNo=c.TechNo left join pub_techInfo b on a.OutTechNo=b.TechNo left join mkt_PnInfo d on a.ProdNo=d.ProdNo <br> where 1=1 and isnull(a.delmark,0)=0 <br> and a.OutTechNo='0201'<br> and Convert(varchar(19),a.PassOverTime,20)>='2007-08-01 00:00:00'<br> and Convert(varchar(19),a.PassOverTime,20)<='2007-09-01 00:00:00'<br>and a.OutTechNo In (select distinct techno from pub_TechInfo where passover =1) <br>and a.InTechNo In( select distinct techno from pub_TechInfo where passover =1)<br>Order By a.createdate desc<br>如果没有Order By a.createdate desc,没有问题,但有这名后,就出现上面的提示