I
instereo911 via AccessMonster.com
Hi all,
I have two joined queries with the same field names for both the queries. one
of the fields is called "MaxofAged Days". I want to make one query that max
the two "MaxofAged Days" fields on both the queries.
Here is the code
SELECT R_Coates_FlashReport_LrgInventory.Date,
R_Coates_FlashReport_LrgInventory.Type, Sum(
[R_Coates_FlashReport_LrgInventory]![Total0and1]+
[R_Coates_FlashReport_SmallGrpInventory]![Total0and1]) AS Between0and1,
Max(([R_Coates_FlashReport_LrgInventory]![MaxOfAged Days]) Or (
[R_Coates_FlashReport_SmallGRPInventory]![MaxOfAged Days])) AS
MAXOFTWOQUERIES
FROM R_Coates_FlashReport_LrgInventory INNER JOIN
R_Coates_FlashReport_SmallGRPInventory ON
(R_Coates_FlashReport_SmallGRPInventory.Type =
R_Coates_FlashReport_LrgInventory.Type) AND
(R_Coates_FlashReport_LrgInventory.Date =
R_Coates_FlashReport_SmallGRPInventory.Date)
GROUP BY R_Coates_FlashReport_LrgInventory.Date,
R_Coates_FlashReport_LrgInventory.Type;
Thanks everyone
I have two joined queries with the same field names for both the queries. one
of the fields is called "MaxofAged Days". I want to make one query that max
the two "MaxofAged Days" fields on both the queries.
Here is the code
SELECT R_Coates_FlashReport_LrgInventory.Date,
R_Coates_FlashReport_LrgInventory.Type, Sum(
[R_Coates_FlashReport_LrgInventory]![Total0and1]+
[R_Coates_FlashReport_SmallGrpInventory]![Total0and1]) AS Between0and1,
Max(([R_Coates_FlashReport_LrgInventory]![MaxOfAged Days]) Or (
[R_Coates_FlashReport_SmallGRPInventory]![MaxOfAged Days])) AS
MAXOFTWOQUERIES
FROM R_Coates_FlashReport_LrgInventory INNER JOIN
R_Coates_FlashReport_SmallGRPInventory ON
(R_Coates_FlashReport_SmallGRPInventory.Type =
R_Coates_FlashReport_LrgInventory.Type) AND
(R_Coates_FlashReport_LrgInventory.Date =
R_Coates_FlashReport_SmallGRPInventory.Date)
GROUP BY R_Coates_FlashReport_LrgInventory.Date,
R_Coates_FlashReport_LrgInventory.Type;
Thanks everyone