Sorting Considerations

There are a couple of points to remember when sorting the database.  If the field being sorted contains alphanumeric data the sort is case-sensitive.  This means that all capital letters come before all lower case letters.  As a result, “BYRD” will come before “Bill”, because capital “Y” comes before lower case “i”.  This situation is best dealt with by being consistent with your data entry.  For example, if you choose to enter a person’s given name with the first letter in capitals and the remainder in lower case, do this for all given names.  This will ensure that the results of the search are consistent.

Sometimes you will store numeric data using a fixed field width and a fill character.  You might want to do this for example, if the number must include zeros to the left.  (Numeric data fields cannot include these leading zeros.)  The fill character will not be considered during the sort, just the actual numeric value.

Sorting by the PhotoFile field generally will not be useful because the photographs are stored in file names with randomly generated names.  However, imported databases might have names for the photograph files which would make sorting useful.

Sorting of times, dates or timestamp fields will be in the expected chronological order, regardless of the format of the display.  This is because dates are always stored in the format YYYY-MM-DD and time is always stored in a 24 hour clock style in the format HH:MM:SS.  Timestamps are stored in date then time order, in the same format as for each separate type.  The descending significance of each element (and presence of all leading zeros) ensures correct order sorting.