hibusalim Beginner
Joined: 02 Sep 2004 Posts: 6 Topics: 4
|
Posted: Wed Jan 12, 2005 7:50 am Post subject: can we access two subsystems in one single query |
|
|
hi,
can anyone help me in resolving this query..
proc sql;
create table a1q3 as
select
a.taxid_no,
q3.seqno,
q3.cdist
from CENSUSFL a, q3seg q3
where a.taxid_no = q3.empno
order by a.taxid_no, q3.seqno;
quit;
run;
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;
This is a DB2 query..
Thanks,
Hibu Salim |
|