I'm having a problem displaying to different phone #'s, one for the contractor and one for the owner. Actually the results I get on the phone# is from the owner instead of one from the Contractor and one from the Owner.
Here's my code:
select a.license_number, h.value, e.fname, e.lname, c.phone_1, c.phone_2, a.date_issued, c.public_building_name, c.line_1, c.line_2, c.subdivision,
c.city, c.State_ID, c.Zip, b.Owner_or_Company_Name, b.Owner_or_Company_Phone, f.name, g.name business_name
from lic_license_holderinfo a,
lic_location_link b,
hbc_core.dbo.c_contact_address c,
lic_license_contact_link d,
hbc_core.dbo.c_contact_people e,
hbc_core.dbo.c_county f,
hbc_core.dbo.c_contact_business g,
lic_condition_data h
where c.id = b.c_contact_address_id
and h.license_holder_info_id = a.id
and a.id = b.license_holderinfo_id
and e.id = d.c_contact_people_id
and d.id = a.primary_contact_link_id
and g.id = d.c_contact_business_id
and f.id = c.county_id
and a.id = 26235
and h.condition_data_def_id = 14
Here's my code:
select a.license_number, h.value, e.fname, e.lname, c.phone_1, c.phone_2, a.date_issued, c.public_building_name, c.line_1, c.line_2, c.subdivision,
c.city, c.State_ID, c.Zip, b.Owner_or_Company_Name, b.Owner_or_Company_Phone, f.name, g.name business_name
from lic_license_holderinfo a,
lic_location_link b,
hbc_core.dbo.c_contact_address c,
lic_license_contact_link d,
hbc_core.dbo.c_contact_people e,
hbc_core.dbo.c_county f,
hbc_core.dbo.c_contact_business g,
lic_condition_data h
where c.id = b.c_contact_address_id
and h.license_holder_info_id = a.id
and a.id = b.license_holderinfo_id
and e.id = d.c_contact_people_id
and d.id = a.primary_contact_link_id
and g.id = d.c_contact_business_id
and f.id = c.county_id
and a.id = 26235
and h.condition_data_def_id = 14