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.
ITSM/.svn/pristine/d6/d6b5dbeacd0a3cdd993f09eb8e6...

25 lines
1.6 KiB

USE [Vertragsverwaltung_20160404]
GO
/****** Object: UserDefinedFunction [dbo].[search_vertragselement] Script Date: 02.12.2016 09:08:53 ******/
DROP FUNCTION [dbo].[search_vertragselement]
GO
/****** Object: UserDefinedFunction [dbo].[search_vertragselement] Script Date: 02.12.2016 09:08:55 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
CREATE FUNCTION [dbo].[search_vertragselement]
(@vertragselementnr int, @suchstring varchar(255))
RETURNS int
AS
BEGIN
declare @cnt int
set @suchstring='%'+@suchstring+'%'
select @cnt=count(vertragselementnr) from dbo.vertragselement where vertragselementnr=@vertragselementnr and
(bezeichnung like @suchstring or beschreibung like @suchstring or nummer like @suchstring or suchbegriffe like @suchstring)
return @cnt
END
GO