J
Jeremy
I am trying to run a query where I set the criteria to <>ID, but I
have about 1000 different IDs I want to run this for. In my SQL
statement below, the number 12490 that I have hard coded I would like
to make a flexible variable. Any ideas??? I would also like to save
the output, so hopefully a make-table or append query would work with
this solution. Since it will take a long-time to run, any ideas for
speed would be great as well.
I have four fields: Date, ID, USDRETURN, MKTVAL_OLD,
SELECT Data.DATE, Sum(Data.USDRETURN) AS SumOfUSDRETURN,
Sum(Data.MKTVAL_OLD) AS SumOfMKTVAL_OLD,
Sum([USDRETURN])/Sum([MKTVAL_OLD]) AS AggRet
FROM Data
WHERE (((Data.ID)<>12490))
GROUP BY Data.DATE;
have about 1000 different IDs I want to run this for. In my SQL
statement below, the number 12490 that I have hard coded I would like
to make a flexible variable. Any ideas??? I would also like to save
the output, so hopefully a make-table or append query would work with
this solution. Since it will take a long-time to run, any ideas for
speed would be great as well.
I have four fields: Date, ID, USDRETURN, MKTVAL_OLD,
SELECT Data.DATE, Sum(Data.USDRETURN) AS SumOfUSDRETURN,
Sum(Data.MKTVAL_OLD) AS SumOfMKTVAL_OLD,
Sum([USDRETURN])/Sum([MKTVAL_OLD]) AS AggRet
FROM Data
WHERE (((Data.ID)<>12490))
GROUP BY Data.DATE;