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.
29 lines
1.4 KiB
29 lines
1.4 KiB
USE [Vertragsverwaltung_20160404]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[sp_get_dbkey] Script Date: 02.12.2016 09:08:53 ******/
|
|
DROP PROCEDURE [dbo].[sp_get_dbkey]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[sp_get_dbkey] Script Date: 02.12.2016 09:08:55 ******/
|
|
SET ANSI_NULLS OFF
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
|
|
|
|
CREATE PROCEDURE [dbo].[sp_get_dbkey]
|
|
@tablename varchar(255),
|
|
@dbkey int output,
|
|
@iErrorcode int output
|
|
AS
|
|
BEGIN
|
|
declare @zwkey int
|
|
select @zwkey = key_wert from key_tabelle where beschreibung = @tablename
|
|
set @zwkey = @zwkey + 1
|
|
update key_tabelle set key_wert = @zwkey where beschreibung=@tablename
|
|
select @dbkey = @zwkey
|
|
select @iErrorCode=@@Error
|
|
END
|
|
|
|
|
|
GO
|