LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 1996, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 28 Aug 1996 20:01:16 -0700
Reply-To:     Peter Tougaard <sdkpto@CENTRUM.DK>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Peter Tougaard <sdkpto@CENTRUM.DK>
Organization: Centrum Verden A/S
Subject:      Order by in Create view

I have a problem with the ORDER BY in the view I create as follows. I want the sort order to be weekday 1, 2, 3 ,4 ,5 ,6 and 7, but the "ORDER BY weekday" in CREATE VIEW gives me the order of days instead of weekdays. Are there any solutions to my problem?

Thanks Peter Tougaard

___________________________ DATA detail1; INPUT day DATE7. amount 7.; FORMAT day DATE7.; CARDS; 19jul96 1312 21jul96 6452 23jul96 4232 19aug96 3412 21aug96 4612 23aug96 7812 23apr96 7812 ; RUN;

PROC SQL; CREATE VIEW detail2 AS SELECT day AS weekday FORMAT WEEKDAY9., day AS month FORMAT MONNAME9., amount AS amount FORMAT 7. FROM detail1 ORDER BY weekday ;

******************************** Gives the following output:

WEEKDAY MONTH SUM ------------------------------ 3 April 7812 6 July 1312 1 July 6452 3 July 4232 2 August 3412 4 August 4612 6 August 7812 **********************************


Back to: Top of message | Previous page | Main SAS-L page