can anyone tell me how to get around this. i have a daily update that relies on MS Query to update figures in my main workbook. At the end of each day, i am to hit a button which updates historical sales data.
Problem arises only on Tuesday. Sure, the SQL of the query is different to each other day. However, try as i might, MS Query will not let me edit the underlying query. the sql for Tuesday and Monday (M, W, Th and Fri are all the same syntax).
MONDAY:
SELECT tbllastyr0021.Date, tbllastyr0021.ProductNo, Sum(tbllastyr0021.NetSaleLastYr) AS 'Net Sale'
FROM `I:\SHARED\Estimates\Estimates`.tbllastyr0021 tbllastyr0021
WHERE (tbllastyr0021.`CAT NO` In ('312','315','450','500','510','520','560')) AND (tbllastyr0021.CALWKNO=?)
GROUP BY tbllastyr0021.Date, tbllastyr0021.ProductNo
TUESDAY
SELECT tbllastyr0022.Date, tbllastyr0022.ProductNo, Sum(tbllastyr0022.NetSaleLastYr) AS 'Net Sale'
FROM `I:\SHARED\Estimates\Estimates`.tbllastyr0022 tbllastyr0022
WHERE (tbllastyr0022.CALWKNO=?)
GROUP BY tbllastyr0022.Date, tbllastyr0022.ProductNo, tbllastyr0022.`CAT NO`
HAVING (tbllastyr0022.`CAT NO` In ('312','315','450','500','510','520','560'))
I want to redo Tuesday's query so that it resembles the format and syntax of Monday - it just won't let me.
any suggestions?
ajm
Problem arises only on Tuesday. Sure, the SQL of the query is different to each other day. However, try as i might, MS Query will not let me edit the underlying query. the sql for Tuesday and Monday (M, W, Th and Fri are all the same syntax).
MONDAY:
SELECT tbllastyr0021.Date, tbllastyr0021.ProductNo, Sum(tbllastyr0021.NetSaleLastYr) AS 'Net Sale'
FROM `I:\SHARED\Estimates\Estimates`.tbllastyr0021 tbllastyr0021
WHERE (tbllastyr0021.`CAT NO` In ('312','315','450','500','510','520','560')) AND (tbllastyr0021.CALWKNO=?)
GROUP BY tbllastyr0021.Date, tbllastyr0021.ProductNo
TUESDAY
SELECT tbllastyr0022.Date, tbllastyr0022.ProductNo, Sum(tbllastyr0022.NetSaleLastYr) AS 'Net Sale'
FROM `I:\SHARED\Estimates\Estimates`.tbllastyr0022 tbllastyr0022
WHERE (tbllastyr0022.CALWKNO=?)
GROUP BY tbllastyr0022.Date, tbllastyr0022.ProductNo, tbllastyr0022.`CAT NO`
HAVING (tbllastyr0022.`CAT NO` In ('312','315','450','500','510','520','560'))
I want to redo Tuesday's query so that it resembles the format and syntax of Monday - it just won't let me.
any suggestions?
ajm