I want to return multiple rows in case statement. is it possible? or is there any alternate way to do it?
select
case
when 3 = 1
then (select orderid from order_master where noOfInstallment = installmentPaid)
else
(select orderid from order_master where noOfInstallment <> installmentPaid)
END
Both sub queries returns multiple rows. Now above query showing following error.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.