When i execute the following query in sql developer, i'm getting the following error message "Ora-01427 single-row subquery returns more than one row"
select TPNATIVENAME as PTPNAME,
INTERFACENAME as CTPNAME,
DIRECTIONALITY,
NENAME,
NCNAME
from TP ,
(select DIRECTIONALITY
from SNCCOMPONENT
where SNCID =
(select unique SNCID
from AFFECTEDXCS
where PXCID = -124)),
(select NODE.NAME as NENAME,
NC.NAME as NCNAME
from NODE NODE,
NETWORKCONTROLLER NC
where NODE.HANDLE =
(select unique SRCNEID
from SNCCOMPONENT
where SNCID =
(select unique SNCID
from AFFECTEDXCS
where PXCID = -124))
and NC.HANDLE = NODE.NCHANDLE)
where NEID =
(select SRCNEID
from SNCCOMPONENT
where SNCID =
(select unique SNCID
from AFFECTEDXCS
where PXCID = -124))
and TPID =
(select SRCTP
from SNCCOMPONENT
where SNCID =
(select unique SNCID
from AFFECTEDXCS
where PXCID = -124))
union
select TPNATIVENAME as PTPNAME,
INTERFACENAME as CTPNAME,
DIRECTIONALITY,
NENAME,
NCNAME
from TP,
(select DIRECTIONALITY
from SNCCOMPONENT
where SNCID =
(select unique SNCID
from AFFECTEDXCS
where PXCID = -124)),
(select NODE.NAME as NENAME,
NC.NAME as NCNAME
from NODE NODE,
NETWORKCONTROLLER NC
where NODE.HANDLE =
(select unique SRCNEID
from SNCCOMPONENT
where SNCID =
(select unique SNCID
from AFFECTEDXCS
where PXCID = -124))
and NC.HANDLE = NODE.NCHANDLE)
where NEID =
(select SINKNEID
from SNCCOMPONENT
where SNCID =
(select unique SNCID
from AFFECTEDXCS
where PXCID = -124))
and TPID =
(select SINKTP
from SNCCOMPONENT
where SNCID =
(select unique SNCID
from AFFECTEDXCS
where PXCID = -124));
I'm not getting which inner query is returning multiple values and how to solve this error?