请协助我撰写这部法律吗?
//** Stored procedure Generate list of items to be removed **//
Create Sp_Add_pass /*purpose is to generate list to the table to be removed Tbl_list_delete (Handle ,list_id,list_type,delete_handle) */
Parameter
@card_id nvarchar
@card_type nvarchar
Create function Gethandle /* purpose is to auto insert in the table, which returns the handle */
create function [dbo].[fnGetHandle]()
returns int
as
begin
declare @Handle as int;
declare @strUser as nchar(256);
set @Handle = 0 ;
set @strUser = Current_User;
insert into tbl_handle
Output Handle into @Handle output
( UserName )
values
( @strUser );
return @Handle ;
end;
Insert into tbl_list_delete
(Handle ,list_id,list_type,delete_handle)
Values (Handle ,list_id,list_type,delete_handle)
/* once the list of items ready & then I can go ahead and do the soft delete items */
Create Sp_remove_pass
Parameters
@card_id
不清楚如何称呼<代码>Fngethandle功能:
Update tbl_list_delete
Set deletehandle- @handle
Where card_id - @card_id, deletehandle = 0 --soft delete