View previous topic :: View next topic |
Author |
Message |
hibusalim Beginner
Joined: 02 Sep 2004 Posts: 6 Topics: 4
|
Posted: Wed Jan 12, 2005 4:49 am Post subject: Max salary in SAS |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Wed Jan 12, 2005 6:17 am Post subject: |
|
|
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 |
|
|
|
|