存储过程:用户进程中发生浮点异常错误.有很多电话在追着我,帮帮忙,分不够再给!
以下是我的一个存储过程里的语句,可总是出以上错误,如不 insert into #temp03
就不会出错,这可这么办,无数电话在追着我,各路高手帮帮忙,这里先谢了!
Select a.Job_No,a.KN_Plan_Finish_Date,a.Usage,a.Raw_No,a.GK_No,a.Kn_Plan_Outer_Qty,
a.Order_Qty,d.Usage_Type,e.color_code,
Case d.Usage_Type when 'C' then Round(KN_Plan_Inner_Qty,0) else
Convert(decimal(10,2),0.00) END as Require_Produce_Qty ,
Convert(decimal(10,2),0.00) as Plan_Produce_Qty,
Case d.Usage_Type when 'C' then Round(isnull(Raw_Reserved_Qty,0),0) else
Convert(decimal(10,2),0.00) END as Fabric_Reserved_Qty,
e.Ry_Qty,e.Yarn_Type,e.Yarn_Count,e.Yarn_Lot,e.Job_Item_Id,
[dbo].[Udf_GetOverseaByYarnLot](e.[Job_Item_ID]) as OverSea,
f.Customer,f.Follower,
Convert(decimal(10,2),0.00) as Fact_Ry_Qty,-- 此字段写入实际配纱量
Convert(decimal(10,2),0.00) as Fact_Dy_Qty,-- 此字段写入色纱留位量
Convert(varchar(4000),space(20)) as Ppo_No,
systemdb.dbo.UDF_GetSizeInfo(c.cc_Width,c.cc_Width_Part,c.cc_Height,c.cc_Height_Part,c.Unit) as size
into #temp03
from pcArrangeMain a
left join ArtDB..rtRawInfo c on a.Raw_No=c.Raw_No
left join SystemDB..pbUsageList d on a.Usage=d.Usage
left join pcArrangeDetail e on a.Job_Id=e.Job_Id
Left join SystemDB..pbCustomerList f on a.Customer=f.Customer_Code
-- left Join pcPpoLot f on a.Job_No=f.Job_No
-- inner join pcPpoItem g on
where a.Job_No='SP026582' and a.Confirmed<>'C'
order by a.KN_Plan_Finish_Date
select * from #temp03
drop table #temp03