




I hope someone can help me with this. It seems fairly simple but I just can't make it work.
I need to create a recordset that displays information from 2 tables when a field in 1 table contains more than 1 like value.
For example if the code field has 3 values that are 110, then display those three records, but not the rest.
This is what I've got so far but it isn't working:
select t.company_id, t.employee_id,t.oth_hrs_cd, c.earn_desc,t.per_end_date
from PUB.tran_hst as t, PUB.co_earn as c
join (select t.oth_hrs_cd, count (*)
from PUB.tran_hst as t
WHERE oth_hrs_cd <> ''
group by oth_hrs_cd
having count (*) > 1) as d on t.oth_hrs_cd = d.oth_hrs_cd
WHERE t.company_id = c.company_id AND t.oth_hrs_cd = c.earn_type AND t.employee_id = 'xxxxxx' AND t.per_end_date = 'xx/xx/xxxx'
Any help would be appreciated.
[/FONT]