Skip to content

Instantly share code, notes, and snippets.

@srkirkland
Last active August 29, 2015 14:07
Show Gist options
  • Save srkirkland/240ae172ebf3e8c235c0 to your computer and use it in GitHub Desktop.
Save srkirkland/240ae172ebf3e8c235c0 to your computer and use it in GitHub Desktop.
some plsql for matching donor info
select * from OPENQUERY(AIS_STAGE, '
select * from
(select UTL_MATCH.JARO_WINKLER_SIMILARITY(last_name || '','' || first_name, ''kirkland,scott'') NameDiff,last_name, first_name from entity
order by NameDiff desc)
where rownum < 10
')
select * from OPENQUERY(AIS_STAGE, '
select email.email_address, telephone.telephone_number from entity
join email on email.id_number = entity.id_number
join telephone on telephone.id_number = entity.id_number
where (email_address = ''youremail@ucdavis.edu'' or telephone_number = ''8675309'')
and rownum < 10
')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment