>I have this function someone gave me that works in another language (SQL server i think) and I made changes (minor) to make it work in foxpro. It is supposed to take all the numbers in 1 column and update another column with the values ordered numerically. i.e.:
>
>column1 column2
>235251 122355
>872919 127899
>123534 123345
Maybe:
CLEAR
? OrderNumerics(235251)
? OrderNumerics(872919)
? OrderNumerics(123534)
FUNCTION OrderNumerics(lnNumber)
LOCAL lcNumbers, lcRetVal
LOCAL lnFor
lcRetVal = []
lcNumbers = TRANSFORM(lnNumber)
FOR lnFor = 0 TO 9
lcRetVal = lcRetVal + CHRTRAN(lcNumbers, CHRTRAN(lcNumbers, TRANSFORM(lnFor), []), [])
NEXT
RETURN VAL(lcRetVal)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.