Solved

GP Batch Posting Error

Posted on 2011-09-09
2
760 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

911 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

19 Experts available now in Live!

Get 1:1 Help Now