pcladylr
asked on
Access string comparison
I need to compare data in two tables. Table 1 has the full, 9-digit social security number, but Table 2 only has the last four digits. I know I could extract the last four digits of the first table in Excel using Text to Columns, but it seems like there would be a way to do this when I create the subset of data for Table 1. I'm not real fluent in SQL, but understand the principles. This will be used on a monthly basis verify vendor statements, so I'd like to automate as much as possible now.
Appreciate an answer to this one.
Cathy
Appreciate an answer to this one.
Cathy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I chose your answer because it shows me how to create this four-digit field in the initial query where I am creating Table 1.
Thank you!
Thank you!
pcladylr,
the query i posted gives you what you are looking for..
the query i posted gives you what you are looking for..
ASKER
And, thanks to both of you for responding so quickly.
ASKER
Capricorn1: Sorry, I just now saw your comment and realize that you indeed did provide the correct answer. I'm not very SQL literate and didn't recognize it. You certainly deserve points. Is there a way I can remedy this? Thank you.
I have no problems with splitting points. I forgot to refresh and didn't see Capricorn1's response!
ASKER
Thanks, Flyster. How do I go about doing that?
That's new territory for me. I would try the request attention link under your original post. That will get to one of the moderators.
select table1.*, table2.*
from table1, table2
where right([Table1].[ssn],4)=ta