Connecting Tech Pros Worldwide Forums | Help | Site Map

Parsing a number

Newbie
 
Join Date: Oct 2006
Posts: 10
#1: Dec 7 '07
I have a database with a social security number field that contains the 9 digit number without hypens. I would like to create a field using a query that just has the last 6 digits of the social security number. Is there a way to do that? Thanks!

Rabbit's Avatar
Expert
 
Join Date: Jan 2007
Location: California
Posts: 3,835
#2: Dec 7 '07

re: Parsing a number


Use the Right() function.
Newbie
 
Join Date: Oct 2006
Posts: 10
#3: Dec 7 '07

re: Parsing a number


Thanks. However, I hate to seem stupid, but how do I do that?
missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 3,000
#4: Dec 7 '07

re: Parsing a number


In the Design Grid for your query, assuming it contains the aforementioned SSN field, in a blank field box type:

LastSixSSN: Right([SSN],6)

Welcome to TheScripts!

Linq ;0)>
Newbie
 
Join Date: Oct 2006
Posts: 10
#5: Dec 8 '07

re: Parsing a number


Thank you so much! I really appreciate your help.
missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 3,000
#6: Dec 8 '07

re: Parsing a number


Glad we could help!

Linq ;0)>
Reply