不能選取 xml 資料類型作為 DISTINCT,因為無法比較。
改為使用union all即可....
select product_id, product_name, product_xmlrule
from product1
where product_date > getdate()
union all
select product_id, product_name, product_xmlrule
from product2
where product_status = 0
select product_id, product_name, product_xmlrule
from product1
where product_date > getdate()
union all
select product_id, product_name, product_xmlrule
from product2
where product_status = 0