FUNNY Indexing
Posted: Sun Jan 22, 2012 11:35 am
Hi to all
This is example program:
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local i := 0
local aData := {"11","9","9999999999","99999999999","11111111111" }
DbCreate( "MyDbf.dbf", { { "Field1", "C", 13, 0 } } )
USE MyDbf
FOR i = 1 TO LEN( aData)
DbAppend()
REPLACE Field1 WITH aData[ i ]
NEXT
INDEX ON VAL(MyDbf->Field1) TO MyIndex
XBROWSE()
return nil
DATA ARE ORDERED LIKE THIS:
99999999999
11111111111
9
11
9999999999
Best Regards
This is example program:
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local i := 0
local aData := {"11","9","9999999999","99999999999","11111111111" }
DbCreate( "MyDbf.dbf", { { "Field1", "C", 13, 0 } } )
USE MyDbf
FOR i = 1 TO LEN( aData)
DbAppend()
REPLACE Field1 WITH aData[ i ]
NEXT
INDEX ON VAL(MyDbf->Field1) TO MyIndex
XBROWSE()
return nil
DATA ARE ORDERED LIKE THIS:
99999999999
11111111111
9
11
9999999999
Best Regards