🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11395

Re: SQL InvoiceSequence question

#11395
From: Antonio Felix
Date: Tue, 26 Nov 2002 10:42
28 lines
1470 bytes
"Bram Schrijver" <aa.schryver@tirol.com> wrote:
>Hello,
>
>I need to generate a invoicenr with help of a SP. This Invoicenr should be
>like this:
>
>Year|Month|Sequencenumber
>
>The sequencenumber has to start every month with 0001
>
>How do I accomplish this?
>
>TIA,
>
>Jerri
>
>

Hi,

Use a Table to store the Invoice Numbers.
Use the Year + Month + Sequence as Primary Key.
Read an increment the sequence based on Year+Month on 
Invoice generation.

HTH
Antonio
Technical Details
Message-ID: <3de35013@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3de2a24d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,2d95c3f362f65af5
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-11-26 03:10:03 PST
From: "Antonio Felix" <hafelix@mail.telepac.pt>
Sender: "Antonio Felix" <hafelix@mail.telepac.pt>
Reply-To: "Antonio Felix" <hafelix@mail.telepac.pt>
Subject: Re: SQL InvoiceSequence question
Newsgroups: borland.public.interbase.sql
X-User-Info: 195.245.190.93 195.245.190.93    
X-Forwarded-For: unknown
References:  <3de2a24d$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3de35013@newsgroups.borland.com>
Date: 26 Nov 2002 02:42:27 -0800
X-Trace: newsgroups.borland.com 1038307347 207.105.83.65 (26 Nov 2002 02:42:27 -0800)
Lines: 28
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail