I’m starting to feel like a broken record when I say one of my favorite things to do is write functions that will leverage the SQL server substring to select from the starting position of your first character, string, or delimeter aka your input string. I’ve previously written a String Extract Extension Method with C# and of course I’ve also written a StringExtractComponent for CakePHP in case you’re interested in something similar in different programming languages.
(more…)
Tag: charindex
-
SQL substring between two characters