x
login about faq Site discussion (meta-askssc)

what is the use of padindex function

what is the use of padindex function , when and where can be used ?

more ▼

asked Nov 21 '11 at 11:08 PM in Default

jhunu gravatar image

jhunu
90 12 26 29

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

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 )

more ▼

answered Nov 21 '11 at 11:18 PM

viikiseth gravatar image

viikiseth
51 1

(comments are locked)
10|1200 characters needed characters left

I'm confused.

Do you mean the PATINDEX function, which, as @viikiseth has indicated, is for string pattern matching - see also http://msdn.microsoft.com/en-us/library/ms188395.aspx

Or did you mean PAD INDEX, which you can use to tune index performance - see http://msdn.microsoft.com/en-us/library/ms186872.aspx

I'm guessing, by the way you described it as a function, that you meant the former...

more ▼

answered Nov 25 '11 at 12:16 PM

ThomasRushton gravatar image

ThomasRushton ♦
29.5k 6 9 36

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x4

asked: Nov 21 '11 at 11:08 PM

Seen: 302 times

Last Updated: Nov 25 '11 at 12:12 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.