AT :
MS-SQL'de string alanda bir karakter veya karakter grubunun kaçıncı sırada olduğunu bulmak için kullanılan UDF (User Definite Function) dir.
Kullanımı:
declare @gcString nvarchar(4000), @gcFindString nvarchar(4000)
select @gcString = 'Tüm insanlar kardeştir', @gcFindString = 'in'
select dbo.AT(@gcFindString, @gcString, default) -- dönen değer=5
Create Scripti:
CREATE function AT (@cSearchExpression nvarchar(4000), @cExpressionSearched nvarchar(4000), @nOccurrence smallint = 1 )
returns smallint
as
begin
if @nOccurrence > 0
begin
declare @i smallint, @StartingPosition smallint
select @i = 0, @StartingPosition = -1
while @StartingPosition <> 0 and @nOccurrence > @i
select @i = @i + 1, @StartingPosition = charindex(@cSearchExpression COLLATE Latin1_General_BIN, @cExpressionSearched COLLATE Latin1_General_BIN, @StartingPosition+1 )
end
else
set @StartingPosition = NULL
return @StartingPosition
end
GO
Kaydol:
Kayıt Yorumları (Atom)
BlackListIP control on Serenity platform (.NET Core)
In the Serenity platform, if you want to block IPs that belong to people you do not want to come from outside in the .net core web project,...
-
Logo Tiger programında kullanılan veritabanı tabloları aşağıdadır. 1. XXX olarak üç digit ile gösterilen bölüm firma numarasını belirtir....
-
In the Serenity platform, if you want to block IPs that belong to people you do not want to come from outside in the .net core web project,...
-
Devexpress AspxGridView kolonlarında filtre türünü değiştirmek için grid üzerindeki ilgili kolonda Settings--> AutoFilterCondition = defa...
Hiç yorum yok:
Yorum Gönder