Krasavita
SSC-Insane
Points: 23138
More actions
July 29, 2009 at 12:42 pm
#134632
I have this CASE WHEN weight < 1 THEN 'UPS' ELSE CASE WHEN weight BETWEEN 1.00 AND 2 THEN 'UPS2' ELSE weight END END I get an error message that I need to convert from varchar to int. How can I do it?Thank you
Ken Simmons
SSCertifiable
Points: 7822
July 29, 2009 at 12:50 pm
#1031965
I think this should work...
CASE WHEN weight < 1 THEN 'UPS'
WHEN weight BETWEEN 1.00 AND 2 THEN 'UPS2'
ELSE CAST(weight AS VARCHAR(50))
END
July 29, 2009 at 1:03 pm
#1031977
Thank you
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply