ubquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. code example

Example: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. Live data this error in asp.net

(select  TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='3' ) FileName3,
    (select TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='4' ) FileName4,
    (select TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='5' ) FileName5,
    (select TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='6' ) FileName6,
    (select TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='7' ) FileName7,
    (select TOP 1 finishProductID from [dbo].APP_Raw_Material where [finishProductID]=@FinishProductId ) FinishProductIDRM

Tags:

Sql Example