I'm trying to write a report on the versions of software we have installed and whether what's installed is up to date, ie, newer or older than our baseline.
declare @var1 varchar(20) = '11.8.800.94'
declare @var2 varchar(20) = '11.8.800.175'
select case
when @var1 > @var2 then '1st'
when @var1 < @var2 then '2nd'
end as test
Query returns '1st'; I want '2nd'.
Any ideas how?