create PROCEDURE [dbo].[ApproveOrder]
@order_no int
AS
declare @status as char(2) select @status=status from Advorders where order_no = @order_no
if @status = 'PA' or @status = 'XX'
begin
update Advorders set status = 'OP', dirty = 1 where order_no = @order_no
end