K
Kristibaer
I have a query that has a field with a calculation that is a sum of two other
fields. I also have another field that detirmines the type of item within a
record, specifically stocking(displays as -1) and non-stocking (displays as
0).
Is there an expression I can use in the criteria of the field that is the
sum of two fields that will default the sum result to zero if the item type
field is non-stocking? Here is the SQL statement if this helps explain what
I am trying to do:
SELECT [PI Freeze].item, [PI Freeze].descrip, [PI Freeze].prodclas, [PI
Freeze].[Freeze Qty], Nz([MAST CNT].[Count],0) AS [Count Qty], ([Count
Qty]-[PI Freeze].[Freeze Qty]) AS [Variance Qty], immaster.stocking
FROM ([PI Freeze] LEFT JOIN [MAST CNT] ON [PI Freeze].item = [MAST
CNT].item) INNER JOIN immaster ON [PI Freeze].item = immaster.item
GROUP BY [PI Freeze].item, [PI Freeze].descrip, [PI Freeze].prodclas, [PI
Freeze].[Freeze Qty], [MAST CNT].Count, Nz([MAST CNT].[Count],0), ([Count
Qty]-[PI Freeze].[Freeze Qty]), immaster.stocking;
thanks,
Kristi
fields. I also have another field that detirmines the type of item within a
record, specifically stocking(displays as -1) and non-stocking (displays as
0).
Is there an expression I can use in the criteria of the field that is the
sum of two fields that will default the sum result to zero if the item type
field is non-stocking? Here is the SQL statement if this helps explain what
I am trying to do:
SELECT [PI Freeze].item, [PI Freeze].descrip, [PI Freeze].prodclas, [PI
Freeze].[Freeze Qty], Nz([MAST CNT].[Count],0) AS [Count Qty], ([Count
Qty]-[PI Freeze].[Freeze Qty]) AS [Variance Qty], immaster.stocking
FROM ([PI Freeze] LEFT JOIN [MAST CNT] ON [PI Freeze].item = [MAST
CNT].item) INNER JOIN immaster ON [PI Freeze].item = immaster.item
GROUP BY [PI Freeze].item, [PI Freeze].descrip, [PI Freeze].prodclas, [PI
Freeze].[Freeze Qty], [MAST CNT].Count, Nz([MAST CNT].[Count],0), ([Count
Qty]-[PI Freeze].[Freeze Qty]), immaster.stocking;
thanks,
Kristi