Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Best Way to Fix Inconsistent Data

(0) ShareShare
ReportReport
Posted on by 2

We have a large amount of inconsistent data throughout our records in our NAV database. An example of this is our customers phone numbers. We have 1000 records with dashes (the incorrect way) and the rest are without dashes. We search for customers by phone number without dashes so this has us creating duplicate customers in our system. There are many other fields such as postal code which are inconsistent as well.

Would the best way to fix this be by creating a dataport and export the data into Excel, fix it there, and then import the data back into NAV or is that not worth the trouble and we should simply have some of our part-timers spend a few days opening up each record within NAV and do it manually? 

*This post is locked for comments

  • Suggested answer
    Tharanga Chandrasekara Profile Picture
    23,116 on at
    RE: Best Way to Fix Inconsistent Data

    You can export data to excel and then do all the modification you required and then upload it back to Dynamics NAV. You can use dataport for this option. (Always export the primary key to excel since you are planning to upload data back)

    As Jonathan said codeunit or process only report also a good option if your data have a pattern that you need to correct.

  • edwardl Profile Picture
    2 on at
    RE: Best Way to Fix Inconsistent Data

    I do have SSMS but I don't like the idea of using SQL scripts when a simple export to excel can get my people on it right away and we don't have to worry when doing this on a Live system.

  • Community Member Profile Picture
    on at
    RE: Best Way to Fix Inconsistent Data

    you're talking developer/programming tools...I don't get the impression so far that he is either...

    Some of us here are just users.

    God! why is everything so complicated?  Oftentimes it seems like NAV is the asylum built by its inmates.

  • keoma Profile Picture
    32,727 on at
    RE: Best Way to Fix Inconsistent Data

    other possibility is to edit and modify the data using smss (sql db mgmt. tool). you have then sql/tsql for mass modifying, no export/import needed.

  • Verified answer
    Suresh Kulla Profile Picture
    47,789 on at
    RE: Best Way to Fix Inconsistent Data

    I am with you, since there are many fields involved just not the phone number, it would be best for you to export the data to the excel and then make all the necessary changes and import back.

  • Verified answer
    keoma Profile Picture
    32,727 on at
    RE: Best Way to Fix Inconsistent Data

    i prefer using custom reports/codeunits. this is in my opinion fast enough and usable for NAS jobs. as you suggested is using a dataport one of the options to export/import data to/from an excel file (csv). other solution: using table excel buffer.

  • edwardl Profile Picture
    2 on at
    RE: Best Way to Fix Inconsistent Data

    "Upload back into NAV".

    How would you recommend I go about this?

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Best Way to Fix Inconsistent Data

    I would think a 1,000 records could be fixed in Excel waaaaay faster than a custom program effort.

    Download into Excel, highlight the phone number column, "REPLACE" dashes, with a blank (not a space, a blank), and you're done. 

    If you want, Excel has a Custom Number Format that's specifically for phone numbers, but it doesn't sound like you want any dashes in your records.

    Upload back into NAV.

    If you expect to do this cleanse every so often, then that is where the custom programming might come in, though it would probably still be faster to just write down the step-by-step procedure someplace: download/Replace/Upload.

  • Suggested answer
    keoma Profile Picture
    32,727 on at
    RE: Best Way to Fix Inconsistent Data

    best (and common) way to fix that is creating a processingonly report or a codeunit, means a batch job. the custom code should run through all customer records, check the phone number and fix the wrong, save, go on. no need to export the records to excel.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans