I am trying to convert an sql statement from an oracle based platform to use it in MS Access (sql server platform). I'm getting a syntax error (of course), but I can't see where the problem is.
The sql is below. Any help would be appreciated.
ERROR: "syntax error in query expression 'EXISTS' ......
Also, in the origional sql the 'where exists...' was written as:
The sql is below. Any help would be appreciated.
Code:
select a.south_index_id, c.cnty_cd, a.southwest_name_source_cd, sp.south_ssn, sp.estimated_birth_dt,
[a.LAST_NAME] & ', ' & [a.FIRST_NAME) PERSONNAME],
a.BIRTH_DT, a.GENDER_CD, sp.ms_pmi, cnty_person_id
FROM SW_alias_name AS a, SW_south_person AS sp, SW_county_pid AS c
WHERE EXISTS ((((select * from SW_alias_name a2 where ucase(a2.last_name) = ucase(a.last_name)
and ucase(a2.first_name) = ucase(a.first_name)
and a2.birth_dt = a.birth_dt
and a2.south_index_id <> a.south_index_id
and a.southwest_name_source_cd = '11'
and a2.southwest_name_source_cd <> '11'
and c.cnty_cd = '11'
and c.south_index_id = a.south_index_id
and c.south_index_id = sp.south_index_id
and sp.deceased_dt is null
and sp.ms_pmi is null))<>False))
ORDER BY personname;
ERROR: "syntax error in query expression 'EXISTS' ......
Also, in the origional sql the 'where exists...' was written as:
Code:
WHERE exists (select 'X' from ....)