该语句已终止。 [英] The statement has been terminated.

查看:107
本文介绍了该语句已终止。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,我正在执行存储过程。当我收到错误时:

Dear all i am executing stored procedure . at the time i am receiving the error :

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
The statement has been terminated.



以下是我的编码请帮助我在哪里做错误:


below is my coding please help me where i did error:

alter PROCEDURE [dbo].[Buson_CopySlabItems]
 -- Add the parameters for the stored procedure here
 @GrpCode VARCHAR(8)
AS
BEGIN

 DELETE FROM BZ_IAB3 WHERE BZ_IAB3.DocEntry=(select BZ_IAB2.DocEntry from BZ_IAB2 where BZ_IAB2.GrpCode=@GrpCode)

INSERT INTO BZ_IAB3(BZ_IAB3.DocEntry,BZ_IAB3.GrpCode,BZ_IAB3.ItemCode,BZ_IAB3.FrmSlab,BZ_IAB3.ToSlab,BZ_IAB3.Percentage)
select BZ_IAB2.DocEntry,OITM.ItemCode,BZ_IAB2.GrpCode,BZ_IAB2.FrmSlab,BZ_IAB2.ToSlab,BZ_IAB2.Percentage from OITM,BZ_IAB2
where BZ_IAB2.DocEntry=(select BZ_IAB2.DocEntry from BZ_IAB2 where BZ_IAB2.GrpCode=@GrpCode)
END

推荐答案

您好,



问题在于:

Hello,

The problem are here:
where BZ_IAB2.DocEntry=(select BZ_IAB2.DocEntry from BZ_IAB2 where BZ_IAB2.GrpCode=@GrpCode)





您的专栏



Your column

BZ_IAB2.DocEntry

只能等于一个值,因此,查询 -

can only be equal to one value, so, the query -

select BZ_IAB2.DocEntry from BZ_IAB2 where BZ_IAB2.GrpCode=@GrpCode

,正在返回记录列表。



干杯,

JAFC

, are returning a list of records.

Cheers,
JAFC


这篇关于该语句已终止。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆