Files
ITSM/___Archiv/ITSM_GRC/.svn/pristine/4c/4c3f446960436ef08657a4e8e878533409f48e68.svn-base
2021-04-20 09:35:24 +02:00

37 lines
2.0 KiB
Plaintext

USE [Vertragsverwaltung_20160404]
GO
/****** Object: StoredProcedure [dbo].[dt_adduserobject_vcs] Script Date: 02.12.2016 09:08:54 ******/
DROP PROCEDURE [dbo].[dt_adduserobject_vcs]
GO
/****** Object: StoredProcedure [dbo].[dt_adduserobject_vcs] Script Date: 02.12.2016 09:08:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
create procedure [dbo].[dt_adduserobject_vcs]
@vchProperty varchar(64)
as
set nocount on
declare @iReturn int
/*
** Create the user object if it does not exist already
*/
begin transaction
select @iReturn = objectid from dbo.dtproperties where property = @vchProperty
if @iReturn IS NULL
begin
insert dbo.dtproperties (property) VALUES (@vchProperty)
update dbo.dtproperties set objectid=@@identity
where id=@@identity and property=@vchProperty
select @iReturn = @@identity
end
commit
return @iReturn
GO