chandrika5
SSCrazy
Points: 2734
More actions
November 9, 2006 at 10:39 am
#174939
I am creating a SP and need to replicate instrREV ( liks in vb) functionality to a sql function. in sqlserver 2000.
Basically need to search for a pattern in a string from the end..
Anybody did this before: any work arounds?
thanks,
Aaron Ingold
SSCrazy Eights
Points: 9070
November 9, 2006 at 11:19 am
#670898
Look in BOL at the REVERSE() and CHARINDEX() or PATINDEX() functions. What you'll want to do is do something like
CHARINDEX(@search_string, REVERSE(@to_be_searched))
November 9, 2006 at 11:28 am
#670902
Found this great UDF in case anybody else requires:
http://www.novicksoftware.com/coding-in-sql/Vol3/cis-v3-N14-performannce-of-dot-net-code-sql-server-2005.htm
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply