Good morning... i have a table that has ssn structured:
11-1111111 or 111-11-1111
When I link to my table it doesn't pull anything up... is there a way that the "-" are removed and I only get 111111111???
Also the genius who designed this has two ssn in some of the fields:
111-11-1111/999-99-9999... don't know if something can be created that if field has more than 9 digits to move the remaining numbers to a new field???
Well any help is appreciated...
Last edited by jgomez; 12-28-2011 at 09:31 AM.
Try =SUBSTITUTE(A1,"-","") To remove the "-" sign
=SUBSTITUTE(LEFT(D4,FIND("/",D4)-1),"-","") To move the reminder.
To thank someone who has helped you, click on the star icon below their name.
I hate reading
Portfolio
I need a job.I am young and incompetent
try those formulas in access??? I did and got error messages...
For your first problem, I would suggest using the " Find and Replace " feature to replace the - with nothing in your ssn
Quoting entire posts clutters the forum and makes threads hard to read !
If you are pleased with a member's answer then use the Star icon to rate it
Click here to see forum rules
The find & replace will work but I’d like to have this done automatically…
Are the dashes in the TINs/SSNs hard coded or are they formatted in the table as an SSN? Look in your table first at the property for the field and let us know the format. If they are hard coded, then you will need to do some manipulation with some queries or an update through some VBA of your recordset. A little tedious but definately doable. Will this be an ongoing adventure or a one time clean up? If hard coded, please verify that the format is text.
If this is hardcoded as text, this will solve the first part of the problem to remove the dashes. Still working on separating the multi tax numbers. How large is your db, ie. how many records? How many with multi tax numbers.
You can uncheck the FindFirst and FindSecond Fields once you have this working and they will not appear in your query results. If you need to amend the table, you can then change this to an make table query and then delete the first table or you can make it an update query to change the values in the first table.SELECT SSN.ID, SSN.SSN, InStr(1,[SSN],"-") AS FindFirst, InStr(4,[SSN],"-") AS FindSecond, IIf([FindSecond]=0,Left([SSN],2) & Right([SSN],7),Left([SSN],3) & Mid([SSN],5,2) & Right([SSN],3)) AS Pure FROM SSN;
Last edited by alansidman; 12-27-2011 at 02:28 PM.
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Their coded as text… I have a query that returns about 1000 results from there I jump into this table to try and gather the additional information I need. This table has about 15,000 records & out of the 1st 3000 only 5 had multiple ssn…
I would run a query that puts an expression in a column similar to
I would then add criteria to this field ="Multi" and manually pull them out and add new records. There appears to be not many and it may be the quickest way to clean this up. Did you try my query to take care of the other matter? Did it work as expected?MulitTax: IIF(Len(SSN)>9, "Multi", "")
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
well i'm working on it... i know its sql but i'm not very good at it... i'm trying to figure out where the name of the table goes and junk... confused because sometimes you use SSN.ID or SSN.SSN or just SSN.
The name of the table is MRT_W_DRR3_ARR_GUARANTOR & the field with the SSN/EIN is G_SSN_EIN. Sorry to be such a noob but I am learning.
SSNSample.zipNo problem. I understand as we were all there at one time. I created a mini database that you can look at and then see how it all comes together. See attached. Then you can change your field names and table names as necessary.
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
See attachment below
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Thank you! I got it. The final output is 8 not 9 digits just so you know but I can fixt that...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks