Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
| Name | Data Type | Length | Description |
|---|---|---|---|
| @idx | bigint | 8 | |
| @kode_barang | varchar | 100 | |
| @part_no | varchar | 100 | |
| @part_no2 | varchar | 100 | |
| @partname | varchar | 100 | |
| @partnamecustoms | varchar | 100 | |
| @hscode | varchar | 100 | |
| @bm | float | 8 | |
| @cekprice | float | 8 |
SQL Script
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE PROCEDURE dbo.spu_dataparths
@idx as bigint,
@kode_barang as varchar(100),
@part_no as varchar(100), @part_no2 varchar(100),
@partname as varchar(100), @partnamecustoms as varchar(100),
@hscode as varchar(100), @bm as float, @cekprice as float
AS
BEGIN
declare @countpartno int
set @countpartno = (SELECT COUNT (*) from dbo.tbl_data_part_hs where id = @idx)
IF @countpartno <> 1
BEGIN
select '01' as status, 'Data Tidak ditemukan' as description
return
END
update dbo.tbl_data_part_hs set
[part_no] = @part_no
,kode_barang = @kode_barang
,[part_name] = @partname
,[part_name_customs] = @partnamecustoms
,[hs_code] = @hscode
,[bm] = @bm
,[cek_price] = @cekprice
,[part_no2] = @part_no2
where [id] = @idx
select '00' as status, 'Data Updated' as description
END
GO
GO
CREATE PROCEDURE dbo.spu_dataparths
@idx as bigint,
@kode_barang as varchar(100),
@part_no as varchar(100), @part_no2 varchar(100),
@partname as varchar(100), @partnamecustoms as varchar(100),
@hscode as varchar(100), @bm as float, @cekprice as float
AS
BEGIN
declare @countpartno int
set @countpartno = (SELECT COUNT (*) from dbo.tbl_data_part_hs where id = @idx)
IF @countpartno <> 1
BEGIN
select '01' as status, 'Data Tidak ditemukan' as description
return
END
update dbo.tbl_data_part_hs set
[part_no] = @part_no
,kode_barang = @kode_barang
,[part_name] = @partname
,[part_name_customs] = @partnamecustoms
,[hs_code] = @hscode
,[bm] = @bm
,[cek_price] = @cekprice
,[part_no2] = @part_no2
where [id] = @idx
select '00' as status, 'Data Updated' as description
END
GO
Depends On
1Used By
No items found