I am comparing two values using CASE. One of them is VARCHAR and the other is NUMERIC. This works but sometimes it is giving error. I am not able to recoginse the error. I tried converting one to them to the other format,but still it didnt work. here is the query:
DECLARE PlannedEffort varchar(10) SET PlannedEffort = '10' DECLARE ActualEffort numeric(32,2) SET ActualEffort = 2.00
select case when ActualEffort > PlannedEffort then 'Yes' else 'No' end as "TimeExceeded"
DECLARE @PlannedEffort varchar(10)
SET @PlannedEffort = '10'
DECLARE @ActualEffort numeric(32,2)
SET @ActualEffort = 2.00
select
case when @ActualEffort > @PlannedEffort then 'Yes' else 'No' end as
'TimeExceeded'