Whats wrong with my query?

Sep 15, 2008 1 Replies

UPDATE Item SET MSRP = (( Price - Cost)/Price)*100 WHERE PRICE > 0.00



Trying to copy margin to msrp for a trigger found on this board


I think the issue may be that the MSRP field is a "currency" field so it expects a money value. Your formula looks to calculate margin percent. Say price = 15, cost = 5; price - cost = $10; $10/$15 = 0.6666 ; multiplied times 100 = $66.66.

But the margin dollars are $10.

H> UPDATE Item

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required