2008/11/14

[SQL]遇到欄位資料型別為xml時,不可使用union的問題

會出現:
不能選取 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

軟體工程的重要的指標