create table Units (
create table Orders (
insert into Units values
insert into Orders values
(Orders.qty/Units.packetsize+case when Orders.qty%Units.packetsize > 0 then 1 else 0 end)*Units.packetsize
Orders.id = Units.id
Still reporting some strange figures, it only happens when my QTY column is greater than or equal to .5 so 10.49 would cause an issue but 10.44 would not.
You mean CURRENTQTY is not an integer number? That fact was not mentioned in the first post or made clear in the examples.
Don't forget that no-one on this list, except you, know what your problem is and what your data model looks like. If those things are not made clear to us, we won't be able to give you a solution that you can actually use.
With kind regards . . . . . SQL Server 2000/2005/2012
Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2. Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages