我在 Oracle 中有以下 sql 查询。
SELECT pr.uuid AS masterproductid,
(case
when xmltype(pr.attributes_de_de).extract('//attr[@name = "SellingPoint1"]/string/text()') IS NOt NULL THEN 'sellingpoint1'
when xmltype(pr.attributes_de_de).extract('//attr[@name = "SellingPoint2"]/string/text()') IS NOt NULL THEN 'sellingpoint2'
END
) as testt
FROM product pr WHERE pr.defaultproductvariationid =(SELECT prv.uuid FROM productvariation prv WHERE prv.uuid = '3rep_vEBP6IAAAE83REjnPbb' AND pr.typecode='16')
在这种情况下 - 当“卖点 1”和“卖点 2”都不为空但此查询仅返回卖点 1 时,我也想要“卖点 2”我怎么能得到它?
感谢帮助