First Select Statement:
SELECT
dbo.FG_FILLIN.PartNumber,
dbo.DropshipPackinglist.Shiplist_Qty,
dbo.DropshipPackinglist.Quantity
FROM dbo.FG_FILLIN INNER JOIN
dbo.DropshipPackinglist ON
dbo.FG_FILLIN.PartNumber = dbo.DropshipPackinglist.PartNumber
WHERE (dbo.FG_FILLIN.Batch = 'CIP_HK_6')
GROUP BY
dbo.FG_FILLIN.Batch,
dbo.FG_FILLIN.PartNumber,
dbo.FG_FILLIN.ItemNumber,
dbo.DropshipPackinglist.Shiplist_Qty,
dbo.DropshipPackinglist.Quantity
Result :
PartNumber Shiplist_Qty Quantity
P02-070161-00111-C100 6 3
P02-070161-10111-C100 6 3
2nd :
SELECT PartNumber,COUNT(Batch) AS Created
FROM dbo.FG_FILLIN
WHERE Batch='CIP_HK_6'
GROUP BY Batch,PartNumber
Result :
PartNumber Created
P02-070161-00111-C100 3
P02-070161-10111-C100 1
Joining this two Query I cant show this one: RESULT NEEDED
PartNumber Shiplist_Qty Quantity Created
P02-070161-00111-C100 6 3 3
P02-070161-10111-C100 6 3 1
It always show : when i Add Count(dbo.FG_FILLIN.Batch) as Created
PartNumber Shiplist_Qty Quantity Created
P02-070161-00111-C100 6 3 6
P02-070161-10111-C100 6 3 2
Any Advice.? Thanks In Regards!