Re: [sqlite] Re: Padding with zeros

2005-12-29 Thread Nathan Kurz
On Fri, Dec 30, 2005 at 12:21:05AM +, Brian Johnson wrote: > I have a field of text and I want to prefix the that text with numbers padded > with zeroes. > > eg currently > text 1 > text 2 > text 3 > > to become > 001 text 1 > 002 text 3 > 003 text 2 > > or ultimately > b001 text 1 > b002 te

Re: [sqlite] Re: Padding with zeros

2005-12-29 Thread Brian Johnson
where can I find info about this? Jay Sprenkle ([EMAIL PROTECTED]) wrote: > > Have you looked at the collating sequence options? > perhaps you can get it to sort how you want without the padding. > > On 12/29/05, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > > Brian Johnson wrote: > > > I need to up

Re: [sqlite] Re: Padding with zeros

2005-12-29 Thread Brian Johnson
I have a field of text and I want to prefix the that text with numbers padded with zeroes. eg currently text 1 text 2 text 3 to become 001 text 1 002 text 3 003 text 2 or ultimately b001 text 1 b002 text 3 b003 text 2 Igor Tandetnik ([EMAIL PROTECTED]) wrote: > > Brian Johnson wrote: > > I nee

Re: [sqlite] Re: Padding with zeros

2005-12-29 Thread Jay Sprenkle
Have you looked at the collating sequence options? perhaps you can get it to sort how you want without the padding. On 12/29/05, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Brian Johnson wrote: > > I need to update a char field to add integer prefixes, but I need to > > pad them with zeroes so I c

[sqlite] Re: Padding with zeros

2005-12-29 Thread Igor Tandetnik
Brian Johnson wrote: I need to update a char field to add integer prefixes, but I need to pad them with zeroes so I can sort them. I'm not exactly sure what you are trying to do, but this would perhaps give you an idea: update table set field=substr('00...0' || field, -20, 20) assuming you

[sqlite] Padding with zeros

2005-12-29 Thread Brian Johnson
I need to update a char field to add integer prefixes, but I need to pad them with zeroes so I can sort them. Can't google any info on how to do this. Could be a mixture of bash and sqlite sql since I want to occasionally run it from the command line

Re: [sqlite] Porting SQL to run on a proprietary operating system

2005-12-29 Thread Jay Sprenkle
If you use ":memory:" as your database name and it will keep the tables in RAM. The only drawback there is I believe you can't share data between threads. Since you only have one thread that might be just what you need. On 12/29/05, Axel Mammes (gmail) <[EMAIL PROTECTED]> wrote: > Flash will only

RE: [sqlite] Porting SQL to run on a proprietary operating system

2005-12-29 Thread Axel Mammes \(gmail\)
Flash will only be used for seldom changed tables or config parameters. Otherwise I am limited to the battery backed up RAM-based file system. -Original Message- From: Jay Sprenkle [mailto:[EMAIL PROTECTED] Sent: Jueves, 29 de Diciembre de 2005 12:10 p.m. To: [EMAIL PROTECTED] Subject:

[sqlite] Porting SQL to run on a proprietary operating system

2005-12-29 Thread Axel Mammes \(gmail\)
I write software for electronic funds transfer terminals. For this project in particular I am using a Verifone Vx570 terminal (www.verifone.com). The platform consists in a 32 bit ARM9 processor with 4-32 MB battery backed up RAM and 4-32 flash. The operating system is called Verix. It supports m