Solved

MS Query (Union Query)

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 ListBox Question 4 48
RUNRMTCMD from AS/400 12 68
Cygwin - GNU GPL License 1 36
adding "ungroup sheets" to existing vbs code 5 30
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

856 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