ankit kumar

ankit kumar

  • NA
  • 5
  • 669

I am getting error subquery return more than one value

Feb 3 2016 4:55 AM
 I am getting error while executing
 
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression
 
 
 Please refer the below query and help me
 
 
 
declare @P_INT_USER_ID int
SET @P_INT_USER_ID=4293

SELECT C.INT_CONSENTSOURCE_ID as ID,
P.INT_APP_ID as AppID,P.VCH_APP_NAME as AppName,
P.VCH_APP_ID as AppNo,M.VCH_MINERAL_NAME as MineralName,
C.VCH_CONSENT_SOURCE as ConsentSource,'CS' as Tname,
C.VCH_CONSENT_FILE as VCH_CONSENT_FILE------------------------added by ankit kumar on 12 Jan 2016
FROM T_FORMA_CONSENTSOURCE C,M_FORMA_PART1 P,M_MINES_MINERAL M
WHERE P.INT_USER_ID IN


(@P_INT_USER_ID,( SELECT INT_USER_ID FROM M_LICENSEE WHERE INT_LICENSEE_ID IN
(
SELECT INT_INACTIVE_ID FROM T_MIS_ACTIVE_TAGGING WHERE INT_ACTIVE_ID=
(
SELECT INT_LICENSEE_ID FROM M_LICENSEE WHERE INT_USER_ID= @P_INT_USER_ID AND BIT_DELETED_FLAG=0

)
)
)
)


AND P.INT_APP_ID=C.INT_APP_ID
AND C.INT_MINERAL_ID=M.INT_MINERAL_ID
AND P.INT_APPROVE_STATUS=1
AND C.BIT_DELETED_FLAG=0 AND P.BIT_DELETED_FLAG=0 AND M.BIT_DELETED_FLAG=0

Answers (3)