I have a question regarding creating a unique numbering scheme. For instance, a unique invoice number/ID. I was thinking about creating it in LC and saving it into the DB. Is it better and easier to creating it using the DB? I thought about doing INV-15-0001 where 15 is the year and then having the ability to create 9999 invoices in a year.
If I set the InvoiceNumber below to AUTOINCREMENT, can I have it start with 0001? If so maybe I could then use it to generate the rest of the number in LC.
Code: Select all
CREATE TABLE MyInvoices(InvoiceID INTEGER PRIMARY KEY AUTOINCREMENT,InvoiceNumber NUM,EventDate DATE,InvoiceDate DATE