control goes to the wrong sql query
913564Jan 27 2012 — edited Jan 27 2012I have a stored procedure with 3 update statements
alter procedure prcUpdateModuleWithStatus(@Mod_Id varchar(10))
as
begin
select @Mod_Id
select Progress from Module where Mod_Id=@Mod_Id
update Module set Status='Completed' where Progress='100.000000' and Mod_Id=@Mod_Id
update Module set Status='Waiting' where Progress='0.000000' and Mod_Id=@Mod_Id
update Module set Status='In Progress' where (Progress >'0.000000' and Progress<'100.000000') and Mod_Id=@Mod_Id
end
when i execute it the control goes to the wrong sql query...
say if Progress is between 0 and 100 the control goes to the query where Progress is 100.
Any idea why this is?