i have got a table in database (MS SQL SERVER 2012) called MINIMUM_AGE, the values are inserted as nvarchar i,e 17 years
54 years
N/A
65 years
and so on
i would like to apply where clause on the column to check for certain age range.
so selecting first two characters, then casting them into integer but in the mean time also checking if the value is not N/A before casting, i know i have to use a combination of CAST() and LEFT(MINIMUM_AGE,2) but cant somehow put it all together, any help will be much appreciated