Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd Sort and SQL ORDER BY Behavior (Part 2)
Message
From
04/08/2000 20:28:48
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00401450
Message ID:
00401464
Views:
22
Ed,

As Barbara pointed out, there is a spelling error. So that means I have posted another bad example in my attempts to show that the data in my tables just doesn't sort correctly.

I had re-typed the 3rd line in case there were any non-printing characters hiding in there.

So how would you know about feeding meds to a PC - that is, unless you tried it! ;-)


>>This looks like it's sorting perfectly for me. You did misspell "Nurse" in the 3rd record, but once I fixed that, the order looks fine.
>>
>>
It works for me, too, with both VFP5 and VFP6, both with and without explicitly creating the index on MyField before doing a SQL Select.
>
>Cindy, have you been feeding leftover prescription meds to your PC? < g,d&r >
>
>>>Here's the minimum code to reproduce the error I am seeing. I have tried this on 2 machines, in VFP and FPW, with different COLLATE settings, and many other ways. I'm just really curious if this is out of order for other people the way it is for me.
>>>
>>>
>>>CREATE CURSOR Dummy (MyField C(60))
>>>
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ;
>>>    ([CLINICAL ASSOCIATE - Nurse Practitioner])
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ;
>>>    ([CLINICAL ASSOCIATE - Nurse Practitioner])
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ;
>>>    ([CLINICAL ASSOCIATE - Nures Practitioner - PBMTU])
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ;
>>>    ([CLINICAL ASSOCIATE - Nurse Practitioner])
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ;
>>>    ([CLINICAL ASSOCIATE - Program Coordinator])
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ([CLINICAL ASSOCIATE - Dir of Women's/Children's Health])
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ;
>>>    ([CLINICAL ASSOCIATE - Nurse Practitioner])
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ;
>>>    ([CLINICAL ASSOCIATE - Nurse Practitioner])
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ;
>>>    ([CLINICAL ASSOCIATE - Nurse Practitioner - PBMTU])
>>>INSERT INTO Dummy (MyField) ;
>>>    VALUES ;
>>>    ([CLINICAL ASSOCIATE - Physician's Associate])
>>>
>>>INDEX ON MyField TAG MyField
>>>BROWSE
>>>
>>>SELECT MyField FROM Dummy ORDER BY MyField
>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform