Subject | Re: [firebird-support] Looking for a stored procedure or function that can find the second occurance of value passed in |
---|---|
Author | Mark Rotteveel |
Post date | 2013-03-14T15:05:36Z |
On Thu, 14 Mar 2013 10:00:17 -0500, "SoftTech" <miket@...>
wrote:
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-intfunc-position.html
but you will need to keep track of the number of occurrences yourself.
Mark
wrote:
> Greetings All,You can use POSITION(...)
>
> I would like to pass in a string and a substr and the position of where
> the
> x occurrence is.
>
> Example:
> String: Then the big red fox jumped over the flowing stream."
> SubStr: the
> occurrence: 2
>
> Would return 34 which is the starting position of the second "the" found
> in
> the string passed in.
>
> Anything like this available anywhere?
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-intfunc-position.html
but you will need to keep track of the number of occurrences yourself.
Mark