M
Morticia Addams
I need a SELECT statement that will order records in numerical order, but the
data type is Text (string).
For example, I have a table called "Block 600", which contains a column
called "TestPoint". Each cell in "TestPoint" is a number, like 1, 2, 3, 10,
11, 12, etc. But the Table schema defines "TestPoint" as Text datatype.
(Microsoft Access 2000).
When I issue the following SQL query:
"SELECT * FROM [Block 600] ORDER BY TestPoint"
I get the records sorted in alphabetical order: 1, 10, 11, 12, 2, 3
etc.
What I want is the records sorted in numerical order: 1, 2, 3, 10, 11, 12,
etc
Changing the database schema is not an option.
Is there a way to make the SQL query order the text in a numerical fashion ?
TIA
data type is Text (string).
For example, I have a table called "Block 600", which contains a column
called "TestPoint". Each cell in "TestPoint" is a number, like 1, 2, 3, 10,
11, 12, etc. But the Table schema defines "TestPoint" as Text datatype.
(Microsoft Access 2000).
When I issue the following SQL query:
"SELECT * FROM [Block 600] ORDER BY TestPoint"
I get the records sorted in alphabetical order: 1, 10, 11, 12, 2, 3
etc.
What I want is the records sorted in numerical order: 1, 2, 3, 10, 11, 12,
etc
Changing the database schema is not an option.
Is there a way to make the SQL query order the text in a numerical fashion ?
TIA