[web2py] Re: Best way to have two auto incremental columns (one is conditional of the other)

2013-12-03 Thread Francisco
Thanks Niphlod. I didn't knew you could do that. I will try and see how this works. El viernes, 29 de noviembre de 2013 15:31:16 UTC-6, Niphlod escribió: > > that's the "idiotest" (does it even exist ? ) scheme ever, but alas, if > you need to because you're forced to, there is absolutely nothin

[web2py] Re: Best way to have two auto incremental columns (one is conditional of the other)

2013-11-29 Thread Niphlod
that's the "idiotest" (does it even exist ? ) scheme ever, but alas, if you need to because you're forced to, there is absolutely nothing you can come up with that is backed up by most database backends. if you're going to use only backends that support *select ... for update*you can use DAL's

[web2py] Re: Best way to have two auto incremental columns (one is conditional of the other)

2013-11-29 Thread Francisco
The requirements for the project ask for a consecutive integer (with a letter or letters appended at the end for the branch it belongs to). So that means no gaps. Assuming I have branch A, B and C the invoices would need to be: For branch A: 1A 2A 3A ... For branch B: 1B 2B 3B ... For branch C:

[web2py] Re: Best way to have two auto incremental columns (one is conditional of the other)

2013-11-29 Thread Niphlod
does unique means with no gaps or just monotonic ? Should that data be an integer ? there are tons of ways to have unique numberings just based on the fact that any given branch can produce a limited amount of invoices in a preset period of time. If, e.g., your company usually issues 50k invoice