+ Reply to Thread
Results 1 to 12 of 12

Thread: Removing symbol(s) from table

  1. #1
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    302

    Removing symbol(s) from table

    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.

  2. #2
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Removing symbol(s) from table

    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

  3. #3
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    302

    Re: Removing symbol(s) from table

    try those formulas in access??? I did and got error messages...

  4. #4
    Extremely Helpful member
    Join Date
    12-23-2006
    Location
    Belgium
    MS-Off Ver
    XL2003
    Posts
    6,127

    Re: Removing symbol(s) from table

    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

  5. #5
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    302

    Re: Removing symbol(s) from table

    The find & replace will work but I’d like to have this done automatically…

  6. #6
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,161

    Re: Removing symbol(s) from table

    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.

    
    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;
    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.
    Last edited by alansidman; 12-27-2011 at 02:28 PM.

  7. #7
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    302

    Re: Removing symbol(s) from table

    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…

  8. #8
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,161

    Re: Removing symbol(s) from table

    I would run a query that puts an expression in a column similar to
    MulitTax: IIF(Len(SSN)>9, "Multi", "")
    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?

  9. #9
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    302

    Re: Removing symbol(s) from table

    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.

  10. #10
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,161

    Re: Removing symbol(s) from table

    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.

  11. #11
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,161

    Re: Removing symbol(s) from table

    See attachment below
    Attached Files Attached Files

  12. #12
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    302

    Re: Removing symbol(s) from table

    Thank you! I got it. The final output is 8 not 9 digits just so you know but I can fixt that...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0