29 lines
1.7 KiB
Transact-SQL
29 lines
1.7 KiB
Transact-SQL
USE [site_fuchs]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[ocms_getItem_byName] Script Date: 02.12.2020 21:05:05 ******/
|
|
DROP PROCEDURE [dbo].[ocms_getItem_byName]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[ocms_getItem_byName] Script Date: 02.12.2020 21:05:06 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
-- =============================================
|
|
-- Author: <Author,,Name>
|
|
-- Create date: <Create Date,,>
|
|
-- Description: <Description,,>
|
|
-- =============================================
|
|
CREATE PROCEDURE [dbo].[ocms_getItem_byName]
|
|
@name nvarchar(255)
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON;
|
|
|
|
DECLARE @ocms_iid bigint = (SELECT TOP(1) [ocms_iid] FROM [dbo].[ocms_items] as i WHERE [name] = @name);
|
|
|
|
EXECUTE [dbo].[ocms_getItem] @ocms_iid;
|
|
END
|
|
GO
|
|
ALTER AUTHORIZATION ON [dbo].[ocms_getItem_byName] TO SCHEMA OWNER
|
|
GO
|