Re: [firebird-support] Sequential auto incremental numbering

2018-09-06 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Wed, Sep 5, 2018 at 10:07 AM, Gabor Boros mlngl...@bgss.hu [firebird-support] wrote: > 2018. 09. 02. 17:03 keltezéssel, 'Christian Giesen' ch...@xt.co.za > [firebird-support] írta: > > > > > I have a need to generate unique sequential invoice/credit note numbers.. > > I fully understand the

Re: [firebird-support] Sequential auto incremental numbering

2018-09-05 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 09. 02. 17:03 keltezéssel, 'Christian Giesen' ch...@xt.co.za [firebird-support] írta: > Good day, > > Using Firebird 3.0.3. > > RAD Studio 10.2.2 (Tokyo) > > I have a need to generate unique sequential invoice/credit note numbers. > I fully understand the usage of generators to produce

Re: [firebird-support] Sequential auto incremental numbering

2018-09-04 Thread 'River~~' river14ap...@gmail.com [firebird-support]
Hi all On Tue, 4 Sep 2018, 00:27 'Louis van Alphen' lo...@nucleo.co.za [firebird-support], wrote: > > > As previous responders have said, generator values are guaranteed to be > unique. However when transactions fail, the generator will skip a value. > Hadn't spotted this: yes that's right and

RE: [firebird-support] Sequential auto incremental numbering

2018-09-03 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi, "As far as I remember, aggregate functions also do not use indexes and will get progressively slower over time." for min/max index is used if you have ascending for MIN and descending for MAX. About topic itself. I always use numbering table and i raly on transaction conflicts.You know if

RE: [firebird-support] Sequential auto incremental numbering

2018-09-03 Thread 'Louis van Alphen' lo...@nucleo.co.za [firebird-support]
, 2018 13:30 To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] Sequential auto incremental numbering > On Sep 3, 2018, at 6:00 AM, 'River~~' river14ap...@gmail.com [firebird-support] wrote: > > Two ideas that should work on any SQL database so long as you nev

Re: [firebird-support] Sequential auto incremental numbering

2018-09-03 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
> On Sep 3, 2018, at 6:00 AM, 'River~~' river14ap...@gmail.com > [firebird-support] wrote: > > Two ideas that should work on any SQL database so long as you never delete > invoices Remember that a transaction can roll back, so delete is not your only challenge. > > I amNot a guru for

Re: [firebird-support] Sequential auto incremental numbering

2018-09-03 Thread 'River~~' river14ap...@gmail.com [firebird-support]
Two ideas that should work on any SQL database so long as you never delete invoices I amNot a guru for this dbms so if a more specific technique is posted it is likely to be faster Note however that while my method may be inefficient, it is more likely to be portable. You pays your money and you

RE: [firebird-support] Sequential auto incremental numbering

2018-09-03 Thread 'Christian Giesen' ch...@xt.co.za [firebird-support]
01:03 To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] Sequential auto incremental numbering Hi Christian, this is a snippet from a long-time working version with several users creating invoices and no problems experienced. This invoice number is then a

Re: [firebird-support] Sequential auto incremental numbering

2018-09-02 Thread Alan J Davies alan.dav...@aldis-systems.co.uk [firebird-support]
Hi Christian, this is a snippet from a long-time working version with several users creating invoices and no problems experienced. This invoice number is then available in Delphi. InvHeadInsert.ExecProc; locInv_Nmbr:=InvHeadInsert.Params.ParamValues['new_inv_nmbr']; There is