Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd SQL ORDER BY Behavior
Message
From
03/08/2000 22:06:55
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00400758
Message ID:
00400835
Views:
21
Unfortunately, none of that works. I may need to wait for Anders Altberg to come back from his vacation to find out what's happening. In any case, it's not that important since it's just a working report to be used to judge salary equity among our physician assistants and nurse practitioners when a new one is hired.


>Does the code below (ORDER BY 1,2 changed to ORDER BY 2) work for you?
>
>>Can anyone explain why this does not put the record with "PBMTU" (Pediatric Bone Marrow Transplant Unit) in the last position?
>>
>>It's for an internal report and really doesn't matter, except that I'm really surprised it comes out in this order.
>>
>>
>>CREATE CURSOR Dummy (Rec N(1), MyField C(60))
>>INSERT INTO Dummy (Rec, MyField) VALUES ;
>>    (1, "CLINICAL ASSOCIATE - Nurse Practitioner")
>>INSERT INTO Dummy (Rec, MyField) VALUES ;
>>    (2, "CLINICAL ASSOCIATE - Nurse Practitioner")
>>INSERT INTO Dummy (Rec, MyField) VALUES ;
>>    (3, "CLINICAL ASSOCIATE - Nurse Practitioner")
>>INSERT INTO Dummy (Rec, MyField) VALUES ;
>>    (4, "CLINICAL ASSOCIATE - Nurse Practitioner")
>>INSERT INTO Dummy (Rec, MyField) VALUES ;
>>    (5, "CLINICAL ASSOCIATE - Nurse Practitioner")
>>INSERT INTO Dummy (Rec, MyField) VALUES ;
>>    (6, "CLINICAL ASSOCIATE - Nurse Practitioner")
>>
>>SELECT Rec, ;
>>    PADR(ALLT(MyField) + IIF(Rec = 3, " - PBMTU", ""), 50) ;
>>    AS MyField ;
>>    FROM Dummy ;
>>    ORDER BY 1, 2
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform