alter VIEW vGetTaf_ID_Of_Product AS select pd.ID , pd.Taf_ID from Product p inner join ProductDetail pd on p.ID = pd.Prod_ID where isnull(pd.Taf_ID ,0) > 0 union all select pd.ID , pd.Taf_ID2 from Product p inner join ProductDetail pd on p.ID = pd.Prod_ID where isnull(pd.Taf_ID2 ,0) > 0