web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Duplicate record in addresszipcode table.

(0) ShareShare
ReportReport
Posted on by 890

Hi,

I am having duplicate record in my table addresszipcode, which shouldnot happen. So, is there any method by which i could restrict it at the table level.

Regards,

*This post is locked for comments

  • Brandon Wiese Profile Picture
    17,790 on at

    What version of AX?

    What type of duplicate?  Same zipcode on multiple records?  RecId conflict?

  • Saurabh P Singh Profile Picture
    890 on at

    It's Ax 2009, Actually each value in the addresszipcode table is being repeated.

  • Verified answer
    Brandon Wiese Profile Picture
    17,790 on at

    Unfortunately ZipCode is not a unique key in the AddressZipCode table as you might think.  First, different countries could use the same ZipCode, and that's valid, so at the very least you might find the same ZipCode used with different CountryRegionId's.

    But, the design of the AddressZipCode table goes further and provides fields like StreetName and FromNum, ToNum, and EvenOdd which are used to describe street-level ZipCode usage.  While it is flexible enough to allow for the full ZIP+4 data set in the United States, for example, it is simply not smart enough to use the data usefully.  That, and the data set is massive (>30 million records).

    If you want to use ZipCode unique, simply create an Index on CountryRegionId and ZipCode, make it unique (set AllowDuplicates to No), and that will enforce the restriction at the table level.

  • Saurabh P Singh Profile Picture
    890 on at

    Hi Brandon Wiese,

    Thanks alot for the help.

    Regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans