I need to pass a value for a SP by multiply it by -1.
This is my query and I want pass the quantity by multiply it by -1.
SELECT top 1 @partid=partid, @unitCostU=unit_cost, @Quantity=qty
FROM parts_table
Exec ins_exusage @partid, 4, @Quantity, @unitCost
Is there any way to do this?
change your fist query to negate the sign @Quantity = -qty
SELECT top 1
@partid = partid ,
@unitCostU = unit_cost,
@Quantity = -qty
FROM @partstable
OR multiply it by -1
@Quantity = qty * -1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With