proc_incoming_inspection.sql

来自「工厂采购系统,DELPHI+SQL SERVER,三层技术」· SQL 代码 · 共 32 行

SQL
32
字号
/*
 incoming material Query

*/

if object_id('dbo.Proc_IM_List') is not null
drop procedure Proc_IM_Qry
go

create procedure Proc_IM_Qry
@order_number varchar(30) = null,
select isnull(a.pono,'客供') as Order_Number,
a.Vendorid,
a.DN_No as DN_Number,
b.Itemno as HPN,
c.CPN,
b.MPN,
c.Description,
b.PO_Qty,
b.Unit as UoM,
b.rec_qty as Rcv_Qty,
b.real_qty as Actual_Qty,
b.Scrap_Qty,
b.Short_Qty,
case when isnull(b.IsRej,0)<>0 then 'Y' else 'N' end as Rjected,
b.jerqueRmk as Reasons,
b.jer_oper as Created_by,
b.jer_date as Created_dt
 from base_recdepot a, base_recdepotc  b,baseitem c
where a.add_id = b.single_id and b.itemno = c.itemno
--and b.short_qty <0
and isnull(a.pono,'')<>''

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?