>Hi,
>
>I need to index a cursor on two columns, one is type NUMERIC(2,0) (COLUMN1) (the value is always a hole number, 1,2,5,3, 12); the other column (COLUMN2) is c(15) but I need to show the values in the order converted to a number. For example, the second column values could be:
>'3330023'
>'23'
>'5667'
>'9900'
>And I need to have them shown in their "numberic" order as
>'23'
>'5667'
>'9900'
>'3330023'
>The index has to be an expression that has +. For example,
>COLUMN1 + INT(VAL(COLUMN2))
>
>But obviously the above will not give me what I am looking for.
>
>TIA for any input
Try
INDEX ON padl(column1, 2, '0') + padl(alltrim(column2),15,'0')
If it's not broken, fix it until it is.
My Blog