Skip to main content

All Questions

Tagged with
4 votes
1 answer
39 views

Parse numbers from text based on relative position to certain substrings

The input is a product code. I want to pull out the "percentage" portion of that code. For example, if the code contains the substring BIO, I want all the numbers that follow it until I hit another ...
Dick Kusleika's user avatar
6 votes
1 answer
333 views

SQL with SUBSTRING / CHARINDEX

I've got a VARCHAR variable of this kind: @string = "BLABLA10;GOGOGO30;RES777;ANOTHER;" (several keyword + number separated ...
PublicDisplayName's user avatar
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'...
JohnLBevan's user avatar
  • 1,409