All,
This may be elementary but I'm somehow 'missing it'.
I have a table, say CLASSES, with the following records (and this is the order entered into the table - record number order - no order set):
PKID TITLE
0001 Class 4
0002 Class 2
0003 Class 3
If I order ascending on TITLE, the PKIDs are sorted as:
0002
0003
0001
I want to select *just* the PKIDs AND keep them in the order they are in when the table is ordered by title.
However, every select I do always reorders them in the order they were entered into the table (record number order).
Is there a way I can use a SELECT statement AND preserve the order that is used in the source table?
Or must I loop through the source table and INSERT the records into the temporary table to keep the order?
Thanks much in advance for any help.
This may be elementary but I'm somehow 'missing it'.
I have a table, say CLASSES, with the following records (and this is the order entered into the table - record number order - no order set):
PKID TITLE
0001 Class 4
0002 Class 2
0003 Class 3
If I order ascending on TITLE, the PKIDs are sorted as:
0002
0003
0001
I want to select *just* the PKIDs AND keep them in the order they are in when the table is ordered by title.
However, every select I do always reorders them in the order they were entered into the table (record number order).
Is there a way I can use a SELECT statement AND preserve the order that is used in the source table?
Or must I loop through the source table and INSERT the records into the temporary table to keep the order?
Thanks much in advance for any help.