Two tables
COMBINED
term
id
number
CLASS
term
dept
catalog
number
DATA IN COMBINED
term id number
1154 5555 10121
1154 5555 9587
1154 44444 5698
1154 44444 99999
DATA IN CLASS
term dept catalog number
1154 ART 1000 10121
1154 ART 101 9587
1154 ART 2000 5698
1154 ART 3000 99999
WHAT data needs to be retrieved
I only want data retrieved for records if they have the same combined.id and 1 record has a catalog# less than 1000 and 1 record has a catalog# greater or equal to 1000 so for the above data only the following is retrieved since combined.id 5555 meets the criteria. combined.id 44444 does not meet the criteria because both records have catalog#s greater or equal to 1000
term dept catalog id number
1154 ART 1000 5555 10121
1154 ART 101 5555 9587
Help is VERY appreciated.
COMBINED
term
id
number
CLASS
term
dept
catalog
number
DATA IN COMBINED
term id number
1154 5555 10121
1154 5555 9587
1154 44444 5698
1154 44444 99999
DATA IN CLASS
term dept catalog number
1154 ART 1000 10121
1154 ART 101 9587
1154 ART 2000 5698
1154 ART 3000 99999
WHAT data needs to be retrieved
I only want data retrieved for records if they have the same combined.id and 1 record has a catalog# less than 1000 and 1 record has a catalog# greater or equal to 1000 so for the above data only the following is retrieved since combined.id 5555 meets the criteria. combined.id 44444 does not meet the criteria because both records have catalog#s greater or equal to 1000
term dept catalog id number
1154 ART 1000 5555 10121
1154 ART 101 5555 9587
Help is VERY appreciated.