locked
How to get rid of "-" in an registration number? In a query. RRS feed

  • Question

  • Hi

    I have customers using different "standards" for their company registration number.

    Some write it 5566900816 while others will write 556690-0816.
    So always ten number in a row. Or - also always - six numbers to the left of "-" and four to the right

    I my case, when exporting the registration number, I want to be without the "-" if its there. The export is via a query.


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00


    Friday, November 18, 2016 12:55 PM

Answers

  • Some write it 5566900816 while others will write 556690-0816.

    Hi Peter,

    You could use the Replace function:

      registration_number = Replace(registration_number,"-","")

    Imb.

      

    • Marked as answer by ForssPeterNova Friday, November 18, 2016 2:03 PM
    Friday, November 18, 2016 1:38 PM

All replies

  • Some write it 5566900816 while others will write 556690-0816.

    Hi Peter,

    You could use the Replace function:

      registration_number = Replace(registration_number,"-","")

    Imb.

      

    • Marked as answer by ForssPeterNova Friday, November 18, 2016 2:03 PM
    Friday, November 18, 2016 1:38 PM
  • Excellent!

    Thank you very much.


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00

    Friday, November 18, 2016 2:04 PM