select case
when p.property_type ='APARTMENT_COMMUNITY'
then (select fp.bedroom_count
from floor_plans fp
where fp.removed = false
and fp.property_id=p.id)
else (select pu.bedroom_count
from property_units pu
where pu.removed = false
and pu.property_id=p.id)
end
from properties p
where p.id =550
ฉันมีเรื่องนี้ bedroom_count ไม่ใช่คนเดียวแถวนั้นมันทำให้เกิดข้อผิดพลาดนี้
เกิดข้อผิดพลาด:มากกว่าหนึ่งแถวกลับมาโดย subquery ใช้ในการแสดง
ฉันต้องได้ผลในกรณีนี้มันมีอีกทางออกสำหรับเรื่องนี้?