The best way is to split your field into 4 separate
fields, so 1.4.C.1 is stored in fields Level1 (Num),
Level2 (Num), Level3 (Text), Level4 (Num) as
Level1=1, Level2=4, Level3="C", Level4=1
If you do so, your table becomes more normalized.
Normalization is a method of structuring your data into
set of related tables in order to query and manipulate
data easier way. One of the normalization rules states
that data in each field must be atomic. Your field
violates that rule and that is why you have problems with
simple operation as sorting.
If you can not normalize tha table, try something like
this:
SELECT LEFT(YourFiled,6) AS BeginPart, MID(YourField,7)
AS EndPart
ORDER BY LEFT(YourFiled,6),MID(YourField,7)
This will work only and only if the beginning of your
value is like "1.4.C." = allways has exactly 6
characters. In other words, you do not have values
like "10.14.C.". Also, if you have something
like "1.4.C12" instead of "1.4.C.12" any query that
attempts to parse the string will return incorrect
results. Only healthy solution is decomposing the field
into separate fields.
-----Original Message-----
I have a data base with a field that is a combination of
numbers and characters such as 1.4.C.1; 1.4.C.2;
1.4.C.11; and so forth. If I sort on this field in
ascending order, these examples I've listed will sort as
1.4.C.1; 1.4.C.11; and 1.4.C.2. How can I get the field
to recognize 1.4.C.1 as 1.4.C.01 without typing in the
zero? I am not an expert programmer and need help as
soon as possible.