All Questions
Tagged with strings sql-server
3 questions
3
votes
1
answer
3k
views
Finding the Nth occurrence of character in string
I wrote an SQL Server function which returns the substring before the Nth occurrence of a character.
For example:
...
3
votes
3
answers
1k
views
Basic T-SQL to compare two same length strings
I've come up with the following T-SQL to compare similar same length strings.
Example usage would be:
OCR returns a value which is expected to be in the database.
PATINDEX is used to check the value'...
3
votes
2
answers
15k
views
Splitting a string in an SQL query
BudgetCode is in the format 'xxxx-yyyyy-zzzzz'. This splits it correctly but I think that there has to be a more efficient way.
...