Thanks Mark,

Guess I should have stated that I need this for Firebird 1.5

Mike

  ----- Original Message ----- 
  From: Mark Rotteveel 
  To: firebird-support@yahoogroups.com 
  Sent: Thursday, March 14, 2013 10:05 AM
  Subject: {Disarmed} Re: [firebird-support] Looking for a stored procedure or 
function that can find the second occurance of value passed in


    
  On Thu, 14 Mar 2013 10:00:17 -0500, "SoftTech" <mi...@softtechks.com>
  wrote:
  > Greetings All,
  > 
  > 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?

  You can use POSITION(...)
  
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


  
  -- 
  This message has been scanned for viruses and 
  dangerous content by MailScanner, and is 
  believed to be clean. 

[Non-text portions of this message have been removed]

Reply via email to