In SQL 2008
I have a column (varchar(5)) whose data looks like this:
The alpha part always should come at the end of the string.
I need to just grab/extract the integer portion of the string or do something else so that I can use it in the following case statement:
DECLARE @NumberPortion int
SET @NumberPortion = ????
WHEN (@NumberPortion BETWEEN 1 AND 99) AND Field2 < 12 THEN 0
WHEN (@NumberPortion BETWEEN 100 AND 199) AND Field2 < 8 THEN 0
WHEN (@NumberPortion >= 200) AND Field2 < 4 THEN 0