View Full Version : stupid question about sorting


clueless2003
07-01-2003, 02:21 PM
This is probably an insanely stupid question, but I'll ask and then duck for cover...

I would like to sort by table by Column 1, Column 2, then Column 3 (just as one would do in Excel). Is that level of sorting possible?

Second, when I try to sort Column 1, I continuously get results such as this:

1
1009
105
10508
2
(you get the idea)

Why? And, how can fix this?

Fizzio
07-01-2003, 02:54 PM
The field type is text. If it is to be populated with all numbers, change the field type to numeric.

RV
07-01-2003, 02:54 PM
As for your first question, you can't sort within a table directly.
Create a query using ORDER BY:

SELECT Column 1, Column 2, Column 3
FROM YourTable
ORDER BY Column 1, Column 2, Column 3

As for your second question, Column1 is of datatype text.
You can fix this by setting the datatype to numeric.
If you're column lenght is fixed (meaning you do have a maximum field length), you could add leading zero's to the text string first.

RV