Altaf Patni
asked on
MS Query (Union Query)
Hi
i got this query from mlmcc, its working like charm.
after some times requirement is changed and
i want to add some more condition in this same query.
like in this part of query i want sum(CFC), sum(PCS), Sum(Total_PCS) where Saleable = Salable
but rest of the thing as it is i want.
"Union Select Prd_Code, Prd_Name, Category, sum(CFC), sum(PCS), Sum(Total_PCS), 0 as D_Rtr_CFC, 0 as D_Rtr_PCS, 'RtrStock' as Source From Rtr_Stock_Dtl group by Prd_Code, Prd_Name, Category " & _
i got this query from mlmcc, its working like charm.
after some times requirement is changed and
i want to add some more condition in this same query.
like in this part of query i want sum(CFC), sum(PCS), Sum(Total_PCS) where Saleable = Salable
but rest of the thing as it is i want.
"Union Select Prd_Code, Prd_Name, Category, sum(CFC), sum(PCS), Sum(Total_PCS), 0 as D_Rtr_CFC, 0 as D_Rtr_PCS, 'RtrStock' as Source From Rtr_Stock_Dtl group by Prd_Code, Prd_Name, Category " & _
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks its working
ASKER
Thanks
ASKER
ok but what about the rest of the part of query, ?
just leave as it is and put where condition on Rtr_Stock_Dtl