Compare two fields in Access to see if one contains the other?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Client Acct Number field that might contain the patient's social
security number. What would be the query to find these?
 
Select all Client Acct Number with 9 digits or all Client Acct Number with
11 digits and dash.
 
Do you have the patient's SSN in a separate field in the same table? Are the
two fields both text fields?

If so, you could run a query with the following:
Field: Client Acct Number
Criteria: LIKE "*" & [SSN] & "*"

SQL would look like:
SELECT *
FROM [Your Table]
WHERE [Client Account Number] LIKE "*" & [SSN] & "*"
 
Back
Top