Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

control goes to the wrong sql query

913564Jan 27 2012 — edited Jan 27 2012
I 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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 24 2012
Added on Jan 27 2012
12 comments
161 views