Solved

MS Query (Union Query)

Posted on 2011-09-13
4
293 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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
printf performancy 11 84
Generate Unique ID in VB.NET 21 101
programming a polycom voip phone 3 52
$_GET call between URL 3 38
This is about my first experience with programming Arduino.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

735 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