Solved

MS Query (Union Query)

Posted on 2011-09-13
4
289 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
A short article about problems I had with the new location API and permissions in Marshmallow
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

823 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