Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

GP2015: SQL Error with the Letter Writing Assistant

Posted on by Microsoft Employee

Hello,

I need some help fixing an issue we are having with the Letter Writing Assistant.  We are using Dynamics GP 2015 and one of our HR staff recently encountered this issue when trying to prepare rejection letters for some recently interviewed applicants. These are the steps she follows:

1) She navigates to Reports > Letter Writing Assistant (and Next);

2) She clicks on Prepare the letters using an existing letter. (and Next);

3) She clicks on Applicant (and Next);

4) She selects Requisition Number from the dropdown list, enters the same requisition number in the From and To textboxes, and selects Rejected from the type of applicants to include (in fact, any type still produces the issue);

5) After clicking Next, she receives the error below:

SQL Error: 102 [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near 'andDYNAMICS'.

6) When she clicks OK, another window opens where she chooses the Decline option:

7) After clicking Next, the "Applicants to receive a letter" window displays with an empty list.

I'm guessing the SQL query fails to return the list of applicants who have been rejected for the specific requisition number.  Has anyone encountered this issue and successfully fixed it?

Note: She can generate the letters individually through the Employee card but it would be much easier to pull the listing and generate the letters as a group using the assistant.

Thanks.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP2015: SQL Error with the Letter Writing Assistant

    Also, I just discovered that I get the SQL error whenever I enter a Requisition Number that is 5 digits (Step 4) in both the From and To fields.  It works as long as the requisition numbers are both less than 5 digits (< 10000), or the From field has less that 5 digits.  This makes no sense to me.

    For example, I don't get the SQL error when the Requisition number in either the From or To field is less than 10000.  Also, I don't get an error when the number in the From field is less than 10000 and the To field is greater that 9999 (10000 and above).  Finally, I don't get an error if the From field has a number > 9999 and the To field is 0 (that is, From: 10001 and To: 0 will return all requisition numbers of 10001 and above). This is really strange.

    But I get the SQL error when both fields have a number that is greater than 9999 (like From: 10001 and To: 10099).

    Thanks.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP2015: SQL Error with the Letter Writing Assistant

    Also, I just discovered that I get the SQL error whenever I enter a Requisition Number that is 5 digits (Step 4) in both the From and To fields.  It works as long as the requisition numbers are both less than 5 digits (< 10000), or the From field has less that 5 digits.  This makes no sense to me. 

    For example, I don't get the SQL error when the Requisition number in either the From or To field is less than 10000.  Also, I don't get an error when the number in the From field is less than 10000 and the To field is greater that 9999 (10000 and above).  Finally, I don't get an error if the From field has a number > 9999 and the To field is 0 (that is, From: 10001 and To: 0 will return all requisition numbers of 10001 and above). This is really strange.

    But I get the SQL error when both fields have a number that is greater than 9999 (like From: 10001 and To: 10099).

    Thanks.

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