Declaración de consulta de información de contacto del vendedor en el módulo Oracle ERP AP

## Declaración de consulta de información de contacto del vendedor en el módulo Oracle ERP AP

'crear o sustituir vista Q_ap_s_cont tan
selecto Vendor_id pv.vendor_id,
pvs.vendor_site_id vendor_site_id,
c_first_name hp.person_first_name,
c_last_name hp.person_last_name,
hp.person_title c_person_title,
c_email_address hcpe.email_address,
c_phone_area_code hcpp.phone_area_code,
c_phone_number hcpp.phone_number,
HCPF. c_fax_area_code phone_area_code,
c_fax_number hcpf.phone_number
de hz_parties hp
, hz_relationships HZR,
hz_contact_points HCPP,
hz_contact_points HCPF,
hz_contact_points HCPE,
ap_suppliers pv,
ap_supplier_sites_all PVS,
hz_party_sites hps
donde hp.party_id = hzr.subject_id
y hzr.relationship_type = 'CONTACTO'
y hzr.relationship_code = 'CONTACT_OF'
y hzr.subject_type = 'PERSONA'
y hzr.subject_table_name = 'HZ_PARTIES'
y hzr.object_type = 'organización'
y hzr.object_table_name = 'HZ_PARTIES'
y HZR .status = 'A'
y hcpp.owner_table_name (+) = 'HZ_PARTIES'
y hcpp.owner_table_id (+) = hzr.party_id
y hcpp.phone_line_type (+) = 'GEN'
y hcpp.contact_point_type (+) = 'PHONE'
y hcpf.owner_table_name (+) = 'HZ_PARTIES'
y hcpf.owner_table_id (+) = hzr.party_id
y hcpf.phone_line_type (+) = 'FAX'
y hcpf.contact_point_type (+) = 'PHONE'
y hcpe.owner_table_type ) = 'HZ_PARTIES'
y hcpe.owner_table_id (+) = hzr.party_id
y hcpe.contact_point_type (+) = 'EMAIL'
y hcpp.status (+) = 'A'
y hcpf.status (+) = 'A'
y hcpe.status (+ ) = 'A'
y hps.party_id = hzr.object_id
y pvs.party_site_id = hps.party_site_id
y pv.vendor_id = pvs.vendor_id
y existe
(seleccione 1
de ap_supplier_contacts ascs
donde (ascs.inactive_date es nulo
o ascs.inactive_date> sys )
y hzr.relationship_id = ascs.relationship_id
y hzr.party_id = ascs.rel_party_id
y hps.party_site_id = ascs.org_party_site_id
y hzr.subject_id = ascs.per_party_id
)
–y pv.vendor_id en (seleccionar vendor_id de proveedores);

Supongo que te gusta

Origin blog.csdn.net/weixin_43292061/article/details/111288541
Recomendado
Clasificación