Last post Jan 14, 2017 11:55 AM by mgebhard
Jan 14, 2017 07:36 AM|uid873724|LINK
Select a.Name, a.RegNo, b.Nationality, c.MobNo,
(SELECT a.DetailId, b.PurposeId,COUNT(a.DetailId) AS Renewed
FROM Detail as a INNER JOIN Request as b on a.DetailId = b.DetailId
INNER JOIN Purpose AS c on a.PurposeId = c.PurposeId
WHERE (b.PurposeId = c.PurposeId) and (a.DetailId = b.DetailId)
GROUP BY a.DetailId, b.PurposeId
HAVING (COUNT(a.DetailId) > 1)) AS Renewed
item.Detail AS a INNER JOIN
general.purpose AS c ON a.DetailId = c.DetailId INNER JOIN item.Ship as b on a.ShipId == b.ShipId
getting error "Only one expression can be specified in the select list when the subquery is not introduced with EXISTS"
Jan 14, 2017 11:55 AM|mgebhard|LINK
I'm surprise the script gets that far considering you have a syntax error. Remove one of the equal signs.
item.Ship as b on a.ShipId == b.ShipId
You have a SELECT as one of the expressions in the SELECT list. This inner SELECT is returning more than one record which is not allowed and it contains more than one field which is not allowed. You'll need to rethink what you're doing. Maybe move the
SELECT to the JOINs.