Hey Guys -
Currently the SQL query below is out-putting
FName LName county contact_name agreed_date engineer_id engineer_id2
Micheal Hayes Dublin Micheal Hayes 2010-06-30 6 8
Micheal Hayes Dublin Micheal Hayes 2010-06-30 6 8
Thomas Morrin Cork Thomas Morrin 2010-07-06 6 8
Thomas Morrin Cork Thomas Morrin 2010-07-06 6 8
Laura Murphy Meath Laura Murphy 2010-07-01 6 8
Laura Murphy Meath Laura Murphy 2010-07-01 6 8
But I want Just:
Micheal Hayes Dublin Micheal Hayes 2010-06-30 6 8
Thomas Morrin Cork Thomas Morrin 2010-07-06 6 8
Laura Murphy Meath Laura Murphy 2010-07-01 6 8
And replace the engineer ID with Name,
6 = Dave
8 = Patrick
And suggestions!
Thanks in advance
Regards Dave
(below the the sql code)
select
c.FName,
c.LName,
c.county,
cc.contact_name,
cc.agreed_date,
t.engineer_id,
t.engineer_id2
from
customer c,
customer_call cc,
engineer e,
type_of_install t
where
c.cus_id = cc.cus_id AND
(t.engineer_id = e.engineer_id OR t.engineer_id2 = e.engineer_id)
;