Re: remove gaps in a table
From: J.O. Aho <user_at_example.net>
Date: Thu, 21 Dec 2017 19:36:39 +0100
Message-ID: <fa2d9nF5jivU1_at_mid.individual.net>
>
> Full ACK.
>
>
> Your logic is flawed. Consider shipping costs, for example.
Date: Thu, 21 Dec 2017 19:36:39 +0100
Message-ID: <fa2d9nF5jivU1_at_mid.individual.net>
[Quoted] On 12/21/17 19:02, Thomas 'PointedEars' Lahn wrote:
> J.O. Aho wrote:
>
>> On 12/20/17 20:27, J�rgen Exner wrote: [Quoted] >>> On Wed, 20 Dec 2017 19:20:09 +0100, "J.O. Aho" <user_at_example.net> wrote >>> in comp.databases.mysql: >>>> For you if you want completely gapless order numbers, don't delete, when >>> >>> ACK. Mark the order as "deleted" but never remove it from the DB. That >>> is the correct way to go.
>
> Full ACK.
>
>>>> an order is "deleted", you generate a new order which is the complete >>>> opposite of the original order, so if the original order is for 3 nails >>>> of a value of 3 dollars, then the new one is for -3 nails for the value >>>> of -3 dollars. This way you have gapless order numbers for the >>>> accounting department and the numbers would be correct from an >>>> accounting point of view. >>> That is nuts. How would e.g. shipping package and send -3 nails? >> >> Yes, but you have a nuts requirement in the first place and accountants >> seems to like things nuts like this. ;)
>
> Your logic is flawed. Consider shipping costs, for example.
[Quoted] No, it's not, if the order is deleted, then you balance the account again with a negative value on the shipping.
This is how accounting works, make something simple to something more complicated.
-- //AhoReceived on Thu Dec 21 2017 - 19:36:39 CET