[GENERAL] Delete after trigger fixing the key of row numbers

2008-03-28 Thread Teemu Juntunen, e-ngine
Greetings from Finland to everyone! I joined the list to hit you with a question ;) I am developing an ERP to customer and I have made few tables using a row number as part of the key. Frex. Order rows table has a key of order number and row number like Receipt rows table has a key of

Re: [GENERAL] Delete after trigger fixing the key of row numbers

2008-03-28 Thread Richard Huxton
Teemu Juntunen, e-ngine wrote: Greetings from Finland to everyone! On behalf of everyone, hello Finland. I joined the list to hit you with a question ;) That's what it's there for. I am developing an ERP to customer and I have made few tables using a row number as part of the key. Frex.

[GENERAL] Delete after trigger fixing the key of row numbers

2008-03-28 Thread Teemu Juntunen
Greetings from Finland to everyone! I joined the list to hit you with a question ;) I am developing an ERP to customer and I have made few tables using a row number as part of the key. Frex. Order rows table has a key of order number and row number like Receipt rows table has a key of

Re: [GENERAL] Delete after trigger fixing the key of row numbers

2008-03-28 Thread Tomasz Ostrowski
On 2008-03-28 13:27, Teemu Juntunen wrote: I am developing an ERP to customer and I have made few tables using a row number as part of the key. When deleting a line from such a table, I have made an after delete trigger, which fixes the row numbers with following command: UPDATE orderrow

VS: [GENERAL] Delete after trigger fixing the key of row numbers

2008-03-28 Thread Teemu Juntunen, e-ngine
trigger fixing the key of row numbers On 2008-03-28 13:27, Teemu Juntunen wrote: I am developing an ERP to customer and I have made few tables using a row number as part of the key. When deleting a line from such a table, I have made an after delete trigger, which fixes the row numbers

Re: VS: [GENERAL] Delete after trigger fixing the key of row numbers

2008-03-28 Thread brian
Teemu Juntunen, e-ngine wrote: Hi Tomasz, with receipt rows I can't see any other option with key as running number. First I tried to use serial, but it didn't start from zero again when the foreign key (receipt number) changes. It just continues the serial despite of the foreign key. Then I