Sorting fields in a record

G

Guest

These are a set of fields to store numeric data to be sorted.
eg.
Number1 6
Number2 8
Number3 16
Number4 3
Number5 7
Number6 25

result should be sorted from lowest to higest in the following fields, how
could this be done? Thanx a lot.

First = 3
Second = 6
Third = 7
Forth = 8
Fifth = 16
Sixth = 25
 
T

tina

your table is not normalized. the best you can do is to normalize the data
using a Union query, so that all the data is in a single "column", and then
sort the data in that column of the query. you can read up on Union queries
in Access Help. recommend you also read up on normalization principles, see
http://home.att.net/~california.db/tips.html#aTip1 for more information.

hth
 
M

Marshall Barton

Carl said:
These are a set of fields to store numeric data to be sorted.
eg.
Number1 6
Number2 8
Number3 16
Number4 3
Number5 7
Number6 25

result should be sorted from lowest to higest in the following fields, how
could this be done? Thanx a lot.

First = 3
Second = 6
Third = 7
Forth = 8
Fifth = 16
Sixth = 25


While almost anything can be done with enough programming,
your request is not practical in a database.

A fundamental rule of relational databases is that related
values need to be in separate records (in a separate table),
not in fields in a single record. Records can be sorted
very easily, but it is near ridiculous to sort fields.

You can not apply the concepts of spreadsheets to database
tables. Search the web for an elementary explanation of the
first three rules of database normalization for more
information.
 
G

Guest

Thanks a lot

Marshall Barton said:
While almost anything can be done with enough programming,
your request is not practical in a database.

A fundamental rule of relational databases is that related
values need to be in separate records (in a separate table),
not in fields in a single record. Records can be sorted
very easily, but it is near ridiculous to sort fields.

You can not apply the concepts of spreadsheets to database
tables. Search the web for an elementary explanation of the
first three rules of database normalization for more
information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top