TABLE A
ID
term
crse_nbr
TABLE B
term
crse_nbr
session
title
TABLE C
term
crse_nbr
session
location
========================
select TABLE A.ID, TABLE B.term, TABLE B.title, TABLE C.location from
TABLE A,
TABLE B,
TABLE C,
where
TABLE A.term=TABLE B.term
and
TABLE A.crse_nbr=TABLE B.crse_nbr
and
TABLE B.term=TABLE C.term
and
TABLE B.crse_nbr=TABLE C.crse_nbr
and
TABLE A.session=TABLE C.session
and
TABLE C.location in (‘PC’,’BT’)
========================
The query so far just retrieves:
ID Location
1 PC
2 PC
2 BT
3 BT
========================
Some of these IDs are also at different location(s) so I really I need:
ID Location
1 PC
1 ON
1 DC
2 PC
2 BT
3 BT
3 SD
Thanks for helping me.
ID
term
crse_nbr
TABLE B
term
crse_nbr
session
title
TABLE C
term
crse_nbr
session
location
========================
select TABLE A.ID, TABLE B.term, TABLE B.title, TABLE C.location from
TABLE A,
TABLE B,
TABLE C,
where
TABLE A.term=TABLE B.term
and
TABLE A.crse_nbr=TABLE B.crse_nbr
and
TABLE B.term=TABLE C.term
and
TABLE B.crse_nbr=TABLE C.crse_nbr
and
TABLE A.session=TABLE C.session
and
TABLE C.location in (‘PC’,’BT’)
========================
The query so far just retrieves:
ID Location
1 PC
2 PC
2 BT
3 BT
========================
Some of these IDs are also at different location(s) so I really I need:
ID Location
1 PC
1 ON
1 DC
2 PC
2 BT
3 BT
3 SD
Thanks for helping me.