MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Max salary in SAS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
hibusalim
Beginner


Joined: 02 Sep 2004
Posts: 6
Topics: 4

PostPosted: Wed Jan 12, 2005 4:49 am    Post subject: Max salary in SAS Reply with quote

I need help in one query..
The following is the query..

Code:

 proc sql;                           
   create table q3top as             
     select                           
      aq1.taxid_no,                   
      aq1.seqno,                     
      aq1.cdist                       
     from a1q3 aq1                                         
     where                                                 
     aq1.seqno = (select max(aq2.seqno)                     
                  from a1q3 aq2                             
                  where aq2.taxid_no = aq1.taxid_no)       
     order by aq1.taxid_no;                                 
   quit;                                                   
 run;                                                       



i want to get the max seq no from aq2 view.



The query is not working for me.

Can u help me regarding this one.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Wed Jan 12, 2005 6:14 am    Post subject: Reply with quote

hibusalim,

please search before posting. check this link which discusses about obtaining the max salary.


http://www.mvsforums.com/helpboards/viewtopic.php?t=23&highlight=salary
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Wed Jan 12, 2005 6:17 am    Post subject: Reply with quote

What error message are you getting? I don't know about DB2 in SAS, but I wouldn't have thought you needed the "ORDER BY" in a "CREATE TABLE".
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group