Prev: WARNING: End of file
Next: Creating new variables
From: deva narsimha on 4 Sep 2007 10:10 Hi All, I want to get the result with group of date fields with descending sort order. When i ran the below code, it is sorting as descending, but when i print the report through proc report procedure,sort variables are not displaying as descending in the report. Please have a look into the below code and give me the right solution. I need to do group by with date fields only with descending order. data temp; format date1 date2 date3 mmddyy10.; input @1 date1 mmddyy10. @12 date2 mmddyy10. @24 date3 mmddyy10. @34 no 2. @37 no1 2. @40 CUSTNO ; datalines; 09/05/2006 01/23/2006 03/15/2001 23 33 25429928 09/05/2006 01/23/2006 04/21/2003 23 33 25429928 09/05/2007 01/23/2006 01/01/2002 23 33 25429928 09/04/2007 01/23/2006 01/01/2002 23 33 25429928 11/21/2006 12/02/2006 01/02/2000 24 90 25429929 11/21/2006 12/02/2006 01/02/2001 24 90 25429929 11/21/2006 12/02/2006 01/02/1999 24 90 25429929 ; run; proc sort data=temp out=temp1; by custno descending date1 no descending date2 no1 descending date3; run; proc report data=temp1 nowd; column CUSTNO date1 no date2 no1 date3 ; define date1 / group descending format= date9.; define date2 / group descending format= date9.; define date3 / group descending format= date9.; run; Thanks, Deva ____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/
|
Pages: 1 Prev: WARNING: End of file Next: Creating new variables |