Solved

GP Batch Posting Error

Posted on 2011-09-09
2
757 Views
Last Modified: 2012-05-12
Error Message:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression


We have just started receiving this error in Great Plains 10 when a user attempts to Post a Sales Batch at the end of the day. The Post seems to still occur, but not before providing this error in a message box 4 or 5 times first. No change has been made to the query or process that posts here.
0
Comment
Question by:ryanwh
  • 2
2 Comments
 
LVL 25

Expert Comment

by:jogos
ID: 36543253
That's mostly something like

select street from adres
where employeeid = (select employeeid from employees where name = 'Jones')

and this runs fine when there is only 1 employee called Jones. The '=' expects only 1 value to be returned but with duplicates occur  

solutions
a) where employeeid IN (.....)
-> you get all the adresses from employees with the name Jones

b) = (select top 1 employeeid from employees ....)
selects only the first, in this case most likely 'forgetting' other employees

c) = (select employeeid from employees where name = 'jones' and firstname = 'Peter')
-> more specific so LESS likely there are duplicates  
0
 
LVL 25

Accepted Solution

by:
jogos earned 500 total points
ID: 36543289
To complete, you mentioned the query was not changed. Exactly, it's the table content that triggers the error and only when multiple rows are found.  So in the above example it could be running for months without a problem and the moment the second Jones is hired the problem begins.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now