Subject Re: indexing with character numbers
From Charlie <tm@tc.com>
Date Sun, 26 Jan 2025 14:19:55 -0500
Newsgroups dbase.getting-started

Thanks Mervyn...  I hadn't looked at your first response closely, but after doing so a light went on in the back of my head!  it works great now.

replace all id with str(val(id),12,0)

use collection exclusive
index on category+id tag test
use collection order test





Mervyn Bick Wrote:

> On 2025/01/26 17:01, Charlie wrote:
> > Thanks for your help guys.
> >
> > I tried this...
> >
> > i tried indexing on val(id)   and it didn't seem to work.  So I tried indexing on a field that was already numeric and it worked alone.  But when I did this...
>
>
>   index on val(id) tag whatever works for me.  id must, however, be a
> character field.
>
>
> >
> > index on category+numeric field tag test  the numeric field was not in order.
> >
> > and have it work?
> >
>
> For a compound index, i.e an index on more than one field, all the index
> expressions MUST evaluate to characters.
>
> Mervyn.