This content has been marked as final. Show 3 replies
These are stored in a DB, right?
It is very important to know which one (Access, MS SQL. etc.) because the needed syntax is DB specific.
Also is "1-101' one id or a range?
My first concern would be the inconsistent way the values are stored:
Depending on how you are using the data and how often they change, you might want to create a look-up table that holds the native ID (like above) and then a well formed id (or series of columns to make the id) that will search and sort correctly.
It is stored in a MS Access DB. I think I figured out how to get things in the correct order. Since there is an inconsistancy in the naming convention, I made a way to make it consistent. I have 2 columns, 1 with the document ID number and the other with just the number of the document (1-17A would have 17 for the second column.) This way I can sot first based on the second column since they are all numeric and the sort for the first column of I have duplicated in the second column.
For example 1-17A and 1-17A.i would both have 17 in the second column, but by sorting by both columns, the order is correct and 1-17A comes before 1-17A.i. For dcoument ID's that don't have a number and rather a letter such ast 1-A, I assing a number of 1000 for A, 1001 for B and so on. This way they too have a number and will usually appear at the end of the list.