Use below procedure to find the occurrence of some characters within a string.
DECLARE @strColumn VARCHAR(20)
DECLARE @searchString VARCHAR(10)
DECLARE @intLen INT
SET @strColumn = '123asd123asd123'
SET @searchString ='123'
SET @intLen = LEN(@searchString)
SELECT (LEN(@strColumn) - LEN(REPLACE(@strColumn, @searchString, '')))/@intLen
DECLARE @strColumn VARCHAR(20)
DECLARE @searchString VARCHAR(10)
DECLARE @intLen INT
SET @strColumn = '123asd123asd123'
SET @searchString ='123'
SET @intLen = LEN(@searchString)
SELECT (LEN(@strColumn) - LEN(REPLACE(@strColumn, @searchString, '')))/@intLen
Piece of writing writing is also a excitement, if you be acquainted with then you can write otherwise it is complicated
ReplyDeleteto write.
My web site: ppc advertising networks
Nice! Exactly what I was looking for. Thanks.
ReplyDelete