You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
2.0 KiB
37 lines
2.0 KiB
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
|