📄 proc_mastrrec_hdr_upd.sql
字号:
if object_id('dbo.Proc_MastrRec_hdr_Upd') is not null
drop procedure Proc_MastrRec_hdr_Upd
go
create procedure Proc_MastrRec_hdr_Upd
@action_cd char(1) = null,
@hpn varchar(18) = null,
@vendor_id varchar(10) = null,
@cpn varchar(30) = null,
@mpn varchar(30) = null,
@model varchar(30) = null,
@UoM char(3) = null,
@unit_Price float = null,
@Currency char(3) = null
as
begin
if not exists(select hpn from PO_Master_Record_Hdr
where hpn = @HPN)
begin
insert into PO_Master_Record_Hdr
(
HPN,
Status,
Vendor_id,
CPN,
MPN,
MODEL,
UoM,
Unit_Price,
Currency,
Blocked
)
values
(
@HPN,
'A',
@Vendor_id,
@CPN,
@MPN,
@MODEL,
@UoM,
@Unit_Price,
@Currency,
'N'
)
end
else
begin
update PO_Master_Record_Hdr
set unit_price = @unit_price,
currency = @currency
where hpn = @hpn
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -