question

jhunu avatar image
jhunu asked

what is the use of padindex function

what is the use of padindex function , when and where can be used ?
patindex
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

viikiseth avatar image
viikiseth answered
Returns the starting position of the first occurrence of a pattern in a specified expression, or zeros if the pattern is not found, on all valid text and character data types. syntax : PATINDEX ( '%pattern%' , expression )
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image
ThomasRushton answered
I'm confused. Do you mean the `PATINDEX` function, which, as @viikiseth has indicated, is for string pattern matching - see also Or did you mean `PAD INDEX`, which you can use to tune index performance - see I'm guessing, by the way you described it as a function, that you meant the former...
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.