Hello,
In a old program of mine, there is a index on
numeric Customer-Numbers ( CDX ).
The index is => Index on STR(number)
index on LTRIM(STR(number)) doesn't work.
When you do a seek on this field ( N 5 0 )
as a sample you seek < 5 > you have to do - - - - 5
4 blanks + "5"
Must i write a function for this ?
Regards
Uwe
A easy way, to do incremental seek on numeric fields ?
A easy way, to do incremental seek on numeric fields ?
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: A easy way, to do incremental seek on numeric fields ?
Uwe
Index on numeric work fine
index on number to ....
and then seek 5 or whatever else
no problem with it, i have many numeric indexs in my app
Richard
Index on numeric work fine
index on number to ....
and then seek 5 or whatever else
no problem with it, i have many numeric indexs in my app
Richard
- Detlef Hoefner
- Posts: 312
- Joined: Sat Oct 08, 2005 9:12 am
- Location: Germany
- Contact:
Uwe,
Moreover it's a bad design to use numeric fields for indexing.
They are better used for numeric operation / calculation.
If you can't avoid it i'd take 'strzero( nVal, nLen, nDec )' for indexing and searching.
Regards,
Detlef
this is normal because all index keys need to be of constant same length.index on LTRIM(STR(number)) doesn't work.
Moreover it's a bad design to use numeric fields for indexing.
They are better used for numeric operation / calculation.
If you can't avoid it i'd take 'strzero( nVal, nLen, nDec )' for indexing and searching.
Regards,
Detlef
Seek on numeric fields
Detlef Thank you,
Yes it is a very old application and
to much work to change it.
I will try Strzero
Regards
Uwe
Yes it is a very old application and
to much work to change it.
I will try Strzero
Regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.