select datas using union operation
-
i want to select both values using union operation how can i do this i use the following sql query SELECT ProdReqId ,ProdSlNo, convert(varchar(10),ProdCurrDate,105) AS Date1 FROM tbl_ProductRequirementDetails where BrachId=4 and Status=1 UNION ALL select PurOrderId ,PurOrderCode,convert(varchar(10),PurOrderCurrDate,105) AS Date2 from tbl_PurchaseOrder where BrachId=4 and Status=1 I want to select -- ProdReqId ,ProdSlNo, convert(varchar(10),ProdCurrDate,105) AS Date1 -- and -- PurOrderId ,PurOrderCode,convert(varchar(10),PurOrderCurrDate,105) AS Date2 -- how can i select that
-
i want to select both values using union operation how can i do this i use the following sql query SELECT ProdReqId ,ProdSlNo, convert(varchar(10),ProdCurrDate,105) AS Date1 FROM tbl_ProductRequirementDetails where BrachId=4 and Status=1 UNION ALL select PurOrderId ,PurOrderCode,convert(varchar(10),PurOrderCurrDate,105) AS Date2 from tbl_PurchaseOrder where BrachId=4 and Status=1 I want to select -- ProdReqId ,ProdSlNo, convert(varchar(10),ProdCurrDate,105) AS Date1 -- and -- PurOrderId ,PurOrderCode,convert(varchar(10),PurOrderCurrDate,105) AS Date2 -- how can i select that
you realy have to explain in details what do you want to achieve
Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za