Link to home
Start Free TrialLog in
Avatar of steven
stevenFlag for United States of America

asked on

I have an update trigger that grabs the qty value from inserted, this value is always double what was inserted by the end user?

The update trigger grabs one field, the qty field and inserts into a table created by us.  The value is always double what was entered.  Please help.
Avatar of steven
steven
Flag of United States of America image

ASKER

here is a the insert?


                  

if (Update(qty_ordered))
Begin            
             
insert into PUt_qtychange (conum,coline,udpatedby,qtyorderd,price)

select     item,
                     co_num,
                     co_line,
                   updatedby,
               qty_ordered,
               price
      from      inserted

end
Avatar of OriNetworks
OriNetworks

Are you sure you are only inserting one line? Watch out for where it may be inserting multiple lines or where that may happen in the future.
Avatar of steven

ASKER

I only update the qty and then checked the table only one line is inserted.
ASKER CERTIFIED SOLUTION
Avatar of OriNetworks
OriNetworks

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial