I missed replying to the correct email, but this tip from Igor Tandetnik
worked beautifully:
Igor Tandetnik
Thu, 29 Dec 2005 14:50:08 -0800
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
http://www.google.com/search?hl=en&q=sqlite+collate&btnG=Google+Search
On 12/29/05, Brian Johnson <[EMAIL PROTECTED]> wrote:
> 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 sor
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
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
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
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
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
7 matches
Mail list logo