Solved

MS Query (Union Query)

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

707 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

16 Experts available now in Live!

Get 1:1 Help Now