aaa
select cnt.contact_uuid, cnt.userid, cnt.last_name, m1.sym as method1, m2.sym as method2, m3.sym as method3, m4.sym as method4from ca_contact as cntleft join usp_contact as usp on cnt.contact_uuid = usp.contact_uuidleft join ct_mth as m1 on usp.c_cm_id1 = m1.idleft join ct_mth as m2 on usp.c_cm_id2 = m2.idleft join ct_mth as m3 on usp.c_cm_id3 = m3.idleft join ct_mth as m4 on usp.c_cm_id4 = m4.id
select cnt.contact_uuid, cnt.userid, cnt.last_name, m1.sym as method1, m2.sym as method2, m3.sym as method3, m4.sym as method4
from ca_contact as cnt
left join usp_contact as usp on cnt.contact_uuid = usp.contact_uuid
left join ct_mth as m1 on usp.c_cm_id1 = m1.id
left join ct_mth as m2 on usp.c_cm_id2 = m2.id
left join ct_mth as m3 on usp.c_cm_id3 = m3.id
left join ct_mth as m4 on usp.c_cm_id4 = m4.id
CA SDM - MS SQL - Script select Group Member (Analyst x Group)
CA SDM - MS SQL - Script to count member group
CA SDM - MS SQL Query para visualizar os Logins realizados na solução
CA SDM Cleaning duplicate contacts - MS SQL