Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Cannot insert duplicate key row

Posted on by 2,095

Hi , I am running strange issue in GP , when ever i post any financial - General transaction and click post and after closing the screen i get print out output but along with error message says :

Microsoft SQL Native Client SQL server Cannot insert Duplicate key row in Object dbo.PJournal with unique index '_WA_SYS_REPORT_2EC5E7B8'.

will be thankfull is some can help about it . 

regards

Rashed

 

*This post is locked for comments

  • veeyeskay Profile Picture
    veeyeskay on at
    Re: Cannot insert duplicate key row

    Hello Rashed

    Thanks for the update.

  • Verified answer
    Rashed Alhakimi Profile Picture
    Rashed Alhakimi 2,095 on at
    Re: Cannot insert duplicate key row

    HI , thank you all for your assistant , made dbcc checktable fixed the issue of pjournals table

    and solve the posting errors ..

  • Rashed Alhakimi Profile Picture
    Rashed Alhakimi 2,095 on at
    Re: Cannot insert duplicate key row

    Yes now Pjournal job works fine . but error message shown earlier still coming :

    cannot insert value null into column report table dbo.pjounal column does not allow nulls . insert fails

    regards

    Rashed

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    Re: Cannot insert duplicate key row

    If you go into SQL and then SQL Agent and see the PJOURNALS job and right click and choose execute now does it complete successfully?

  • Rashed Alhakimi Profile Picture
    Rashed Alhakimi 2,095 on at
    Re: Cannot insert duplicate key row

    HI , Richard ,

    Thanks for your always cooperation .

    i tried the query for deleting the contents of the table also didn't work so i had to drop the table and recreate it again and now its empty and job is running perfectly with note that there was around 38000 record .

    now after clearing it  , whenever i post transaction i receive new error like :

    cannot insert value null into column report table dbo.pjounal column does not allow nulls . insert fails

    regards

    Rashed

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    Re: Cannot insert duplicate key row

    Try just loggin into SQL and issing this command against your company database.

    DELETE PJOURNAL

    This will empty the PJOURNAL table and then try posting. If this is working make sure the EMPTY PJOURNALS job exists and is scheduled to run.

  • Rashed Alhakimi Profile Picture
    Rashed Alhakimi 2,095 on at
    Re: Cannot insert duplicate key row

    Hi Leslie ,

    Thank you for your answer .

    but i tried to run the Pjournal job but its giving an error message :

    Execution of job 'Remove Posted Pjournals from All companies' failed see the history log for details'

    Regards

    Rashed

  • L Vail Profile Picture
    L Vail 65,271 on at
    Re: Cannot insert duplicate key row

    First, make sure SQL agent is running and that you have the pjournal job enabled.

    Next, run DELETE PJOURNAL against the company database.

    If the PJOURNAL job isn't active, start it.

    This may help

    Kind regards,

    Leslie

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans