The syntax is not correct on this sql to use in MS Access.
Can you help? I think I need brackets around the joins and/or 'inner' before the join....
Can you help? I think I need brackets around the joins and/or 'inner' before the join....
Code:
select p.sw_index_id, [P.LAST_NAME] & ', ' & [P.FIRST_NAME] AS PERSONNAME1,
cp.cnty_cd, p.ssn, p.last_chgd_dt, an.gender_cd, p.birth_dt, p.gender_cd, p.pmi,
sp1.ms_pmi, an.birth_dt
from salti_person p
join sw_alias_name an on an.south_index_id = p.south_index_id
join sw_county_pid cp on p.person_id = cp.cnty_person_id and cp.cnty_cd = '11'
join sw_south_person sp1 on p.south_index_id = sp1.south_index_id
where p.gender_cd <> an.gender_cd
and p.south_index_id = an.south_index_id
and p.birth_dt = sp1.birth_dt
order by p.south_index_id