Solved

MS Query (Union Query)

Posted on 2011-09-13
4
286 Views
Last Modified: 2012-05-12
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 " & _
0
Comment
Question by:crystal_Tech
  • 3
4 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 36533017
sum(CFC) as TotCFC, sum(PCS) as TotPCS, Sum(Total_PCS) as TotalPCS, ...Where Saleable = "Salable"

mlmcc
0
 
LVL 1

Author Comment

by:crystal_Tech
ID: 36533040

ok but what about the rest of the part of query, ?
just leave as it is and put where condition on Rtr_Stock_Dtl
0
 
LVL 1

Author Comment

by:crystal_Tech
ID: 36533168
Thanks its working
0
 
LVL 1

Author Closing Comment

by:crystal_Tech
ID: 36533176
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now