Viewing 15 posts - 1 through 15 (of 43 total)
Here is my answer!
SELECT pt.[imtPartID], pt.[imtTransactionType],
SUM (CASE WHEN pt.[imtTransactionType] = 1 THEN pt.[imtPurchaseQuantityReceived] ELSE 0.00000 END) AS Receipt,
SUM (CASE WHEN pt.[imtTransactionType] = 2 THEN pt.[imtPurchaseQuantityReceived] ELSE...
November 29, 2021 at 7:46 pm
This is great.
So now I need to add another fiend into the mix. There must be some rules to make this happen. Basically, I need to add the other field,...
November 24, 2021 at 10:42 pm
Just one more question...
If there are no values, thus no sums in the Pivot Query below, is there a way to have it return zero's?
SELECT pt.[imtPartID],
SUM(CASE...
November 10, 2021 at 6:41 pm
Got it, thanks. I think part of my dilemma has been those controls are so small, and when I hover over them the descriptions are covered up by Windows icons.
November 3, 2021 at 6:53 pm
Phil:
Happy to comply, but I'm not sure I know how to do those things. I will try to figure it out.
Other sites have controls for these things, which I do...
November 3, 2021 at 6:19 pm
Just one more thing... The example above spans 29 months. Is there a good way to separate it out to place three columns for each month within the date range?
November 3, 2021 at 6:17 pm
I think this does it.
SELECT pt.[imtPartID],
SUM(CASE WHEN pt.[imtTransactionType] = 1 THEN 1 ELSE 0 END) AS Receipt,
SUM(CASE WHEN pt.[imtTransactionType] = 2 THEN 1 ELSE 0 END) AS...
November 3, 2021 at 6:02 pm
Jonathan, Thanks again!
SELECT TOP (1000000) [PartTransactions].[imtTransactionDate]
,[PartTransactions].[imtTransactionType]
,[PartTransactions].[imtPartID]
FROM [M1_SU].[dbo].[PartTransactions]
WHERE [imtPartID] = '7000917' AND imtTransactionDate BETWEEN '5/1/2019 3:13:52 PM' AND '10/29/2021 3:13:52 PM'
ORDER BY imtTransactionDate DESC
Ok, here's some data for...
November 3, 2021 at 5:59 pm
This is good, except that all the values are zero. I know for certain there are nine records with valid data here. Am I supposed to do something with the...
November 3, 2021 at 5:47 pm
I added a pic. Unfortunately, lots of red underlines means I cannot get results.
November 3, 2021 at 5:24 pm
I did figure this out, so much thanks to everyone for the help. There was zer0 data after all....
May 26, 2021 at 8:57 pm
SELECT JobOperations.jmoJobID AS JobNo, JobAssemblies.jmaPartID AS PartID, JobAssemblies.jmaPartShortDescription AS Description, JobOperations.jmoOperationQuantity AS Qty, JobOperations.jmoWorkCenterID AS WorkCenter, JobOperations.jmoProcessID AS Process, SUM(JobOperations.jmoCompletedProductionHours) AS Hours, JobOperations.jmoProductionComplete AS C, CAST(JobOperations.jmoCreatedDate AS DATE) AS StartDate,...
May 26, 2021 at 8:14 pm
Viewing 15 posts - 1 through 15 (of 43 total)