42 lines
1,016 B
Transact-SQL
42 lines
1,016 B
Transact-SQL
CREATE PROCEDURE [dbo].[up_item_update_itemcode_option]
|
|
(
|
|
@item_id [uniqueidentifier],
|
|
@item_code int,
|
|
@opt_code01 int,
|
|
@opt_code02 int,
|
|
@opt_code03 int,
|
|
@opt_value01 int,
|
|
@opt_value02 int,
|
|
@opt_value03 int,
|
|
@unknonw_param int -- ???
|
|
|
|
)
|
|
as
|
|
set nocount on
|
|
|
|
if exists ( select [item_uid] from [dbo].N_InventoryItem WITH (NOLOCK) where item_uid = @item_id )
|
|
begin
|
|
update [dbo].N_InventoryItem set
|
|
code = @item_code,
|
|
option_1_code = @opt_code01,
|
|
option_2_code = @opt_code02,
|
|
option_3_code = @opt_code03,
|
|
option_1_value = @opt_value01,
|
|
option_2_value = @opt_value02,
|
|
option_3_value = @opt_value03
|
|
where item_uid = @item_id;
|
|
end
|
|
else
|
|
begin
|
|
update [dbo].N_EquipItem set
|
|
code = @item_code,
|
|
option_1_code = @opt_code01,
|
|
option_2_code = @opt_code02,
|
|
option_3_code = @opt_code03,
|
|
option_1_value = @opt_value01,
|
|
option_2_value = @opt_value02,
|
|
option_3_value = @opt_value03
|
|
where item_uid = @item_id;
|
|
end
|
|
|
|
return @@error
|