I am trying to cast/ convert varchar to a numeric value. I have done this succesfuly when I eval the lower range, however I get an error when I do the upper range.
this is my evaluation section that works.
isnull(cast(measurmentdata.measvalue as numeric),0) < productinfo.lowerrange
however when I try to test to see if it is above the upper range it throws an error
isnull(cast(measurmentdata.measvalue as numeric),0) > productinfo.upperrange
I have tried not between as well. while it does not return any errors it does not correctly test for > or <
isnull(cast(measurmentdata.measvalue as numeric),0) not between productinfo.lowerrange and productinfo.upperrange