Adding Records at Start

Lloyd Butler lbutler at on.pelmorex.com
Wed Jan 7 14:43:58 CST 2004


> SELECT DISTINCT level_1 FROM resources ORDER BY ID
> should result in a unique list sorted by ID number. Instead I get a list of
> everything in a strange order -
> 
> ["Screenshots Library", "Offline Materials - PDFs", "Websites",
> "PowerPoints", "Videos", "Screenshots Library", "Screenshots Library",
> "Screenshots Library", "Screenshots Library", "Screenshots Library",
> "Screenshots Library", "Screenshots Library", "Pictures Library"]
> 
> which when looked at by ID number is
> [1, 10, 11, 12, 13, 2, 3, 4, 5, 6, 7, 8, 9]
Mark,

You ID field looks to be text rather than number. As a text field (varchar,
string), then it sorts this way. Change it to an number field (short, long)

If you were looking to RecID, the internal hidden field then the cursor is
ordered by it by default.

Lloyd Butler
Product and System Development Supervisor
TWN Commercial Services



More information about the Valentina mailing list