Options

Duplicate records being displayed while running the table in NAV 2015

prem_kumaranprem_kumaran Member Posts: 10
Hello,

I am facing a strange issue.

The records are getting inserted in the staging table of NAV. But, when viewing those records by running the table from NAV the number of records displaying in NAV and SQL are different. It is displaying the duplicate records which has the same primary key combination.

Did anyone faced this issue ? Any solution for this ?
Thanks,
Prem

Answers

  • Options
    kinekine Member Posts: 12,562
    Check if the primary key is correctly defined. I expect that you see more in the NAV than in the SQL. Do not forget that NAV Service tier is heavily caching and the SQL could see the changes with delay.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    prem_kumaranprem_kumaran Member Posts: 10
    Hello Kine,

    Yes, I am seeing more in NAV than SQL.
    Thanks,
    Prem
  • Options
    prem_kumaranprem_kumaran Member Posts: 10
    Hello Kine,

    I tried changing the Primary Key and the issue remains the same. I am really going crazy because of this issue.
    Thanks,
    Prem
  • Options
    Purvesh_MaisuriaPurvesh_Maisuria Member Posts: 71
    Hi Prem,

    This issue may happened because of white spaces before or after primarykey's value. This may occurred when you copy & paste value of field from the XLS. This white space may not shown in NAV, but it is exist at SQL side.

    You also not get record if you write SQL select query like below because of white spaces.

    Select * from Item Where [No.] = 'A0001';

    You get record via below query.

    Select * from Item Where [No.] like '%A0001%';

    If is it so, you need to update your primarykey's value via SQL update query.

    Note : In the case of record whose transaction entries are already posted. It is strictly not advisable to update it via SQL. If no transactions are done, you can do that.

    Thanks,
    Purvesh Maisuria.
Sign In or Register to comment.