combine like items in query

L

lmiller

Good Afternoon,

I would like to thank you in advance for taking the time to try and help me
with my request. I have posed a similar question about a month ago. I was
trying to develop a combined query on our 7th and 8th term inventory. Please
see below by SQL
SELECT [COMBINED PARTS].[PART #], [COMBINED PARTS].[PART NAME], [BEGINNING
INVENTORY BALANCE 8TH].[END BALANCE 7], [inventory rd 8th].[END BALANCE 8],
nz([END BALANCE 7],0)+nz([END BALANCE 8],0) AS [SUM OF BALANCES]
FROM ([COMBINED PARTS] LEFT JOIN [BEGINNING INVENTORY BALANCE 8TH] ON
[COMBINED PARTS].[PART #] = [BEGINNING INVENTORY BALANCE 8TH].[PART #]) LEFT
JOIN [inventory rd 8th] ON [COMBINED PARTS].[PART #] = [inventory rd
8th].[PART #]
GROUP BY [COMBINED PARTS].[PART #], [COMBINED PARTS].[PART NAME], [BEGINNING
INVENTORY BALANCE 8TH].[END BALANCE 7], [inventory rd 8th].[END BALANCE 8],
nz([END BALANCE 7],0)+nz([END BALANCE 8],0)
HAVING ((([COMBINED PARTS].[PART NAME])>"0"));


The query runs correctly except when the parts are the same for Term 7 and
Term 8 it is listed twice. example below:

PART # PART NAME END BALANCE 7 END BALANCE 8 SUM OF BALANCES
52375-SVB-A010-78 BRKT, STABI L 4 20 24
52375-SVB-A010-78 BRKT, STABI R 4 20 24
52376-SVB-A010-78 BRKT, STABI L 4 20 24
52376-SVB-A010-78 BRKT, STABI R 4 20 24

At the end of the 7th term we had 4 pieces of each of these parts. In the
either term we purchased 20. I would like to develop a query or fix this
one show it lists the part # and name and only the ending balance of 24 on 1
line rather than 2 different lines. I have tried different options to no
avail Does anyone have any suggestions? This is just a sample there
are numerous parts as this.

THANKS!!!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top