早教吧 育儿知识 作业答案 考试题库 百科 知识分享

当计算中有一项select是空集时,所计算的结果值将为NULL,如何将NULL变

题目详情
当计算中有一项select是空集时,所计算的结果值将为NULL,如何将NULL变
▼优质解答
答案和解析
整句可写为:select PartNo,Pack,Brand, (isnull((select sum(Qty) from wh_indl where wh_indl.PartNo=wr_ware.PartNo and wh_indl.Brand=wr_ware.Brand),0) as float)- isnull((select sum(Qty) from wh_outdl where wh_outdl.PartNo=wr_ware.PartNo and wh_outdl.Brand=wr_ware.Brand),0)- isnull((select sum(whqty-actqty) from wh_mkinventorydl where wh_mkinventorydl.PartNo=wr_ware.PartNo and wh_mkinventorydl.Brand=wr_ware.Brand ),0)) from wr_ware where Model=@model
看了 当计算中有一项select是...的网友还看了以下: