Skip to content

Instantly share code, notes, and snippets.

@bmchild bmchild/userQuery.sql
Last active Aug 29, 2015

Embed
What would you like to do?
select *
from User
where
userId in (:userIds)
-- Then we need an OR clause for each match we want
OR ( lastName = :lastName1 AND SUBSTRING(ssn, LEN(ssn)-3, 4) = :lastFourSsn1)
OR ( lastName = :lastName2 AND SUBSTRING(ssn, LEN(ssn)-3, 4) = :lastFourSsn2)
-- ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.