PATINDEX returns starting position of first occurrence of a pattern in a string,or zero if it is not available in string.
Here i am trying to find ‘%S%’ in string ‘SQL Server’ of course output should be 1.
Let’s try to find ‘%Q%’ in same string.Guess what output should be.
Now i want to search SQL in same string.
It is very clear from output first occurrence of ‘SQL’ in string is starting from 1st position.
So output should be 1.
That’s It
Enjoy Learning.
Here i am trying to find ‘%S%’ in string ‘SQL Server’ of course output should be 1.
Let’s try to find ‘%Q%’ in same string.Guess what output should be.
Now i want to search SQL in same string.
It is very clear from output first occurrence of ‘SQL’ in string is starting from 1st position.
So output should be 1.
That’s It
Enjoy Learning.
No comments:
Post a Comment