A
Andrew
Using Microsoft query I manually edit the SQL to the
following.
select
gl30000.ormstrid as customer,
sum(gl30000.crdtamnt) as credt,
sum(gl30000.debitamt) as debt,
sum(gl30000.crdtamnt) - sum(debitamt) as diff
from
gl30000
join gl00100
on gl00100.actindx = gl30000.actindx
and ((gl00100.actnumbr_3 >= 2500 and
gl00100.actnumbr_3 <= 2599) or (gl00100.actnumbr_3 >=1400
and gl00100.actnumbr_3 <= 1499))
where
gl30000.trxdate < '2003-07-01'
group by gl30000.ormstrid
order by gl30000.ormstrid
The query runs successfully and I the data goes into
Excel. I save the query as beginningbalance.dqy The
problem is when I try and re-run the query using "Get
External Data Run Saved Query. When I try and open
beginningbalance.dqy I get an error."Microsoft Query could
not open or read this query file. Either the file has been
damaged or the file format is invalid."
Do microsoft query files .dbq not allow the use of
aggragate functions?
Thanks
following.
select
gl30000.ormstrid as customer,
sum(gl30000.crdtamnt) as credt,
sum(gl30000.debitamt) as debt,
sum(gl30000.crdtamnt) - sum(debitamt) as diff
from
gl30000
join gl00100
on gl00100.actindx = gl30000.actindx
and ((gl00100.actnumbr_3 >= 2500 and
gl00100.actnumbr_3 <= 2599) or (gl00100.actnumbr_3 >=1400
and gl00100.actnumbr_3 <= 1499))
where
gl30000.trxdate < '2003-07-01'
group by gl30000.ormstrid
order by gl30000.ormstrid
The query runs successfully and I the data goes into
Excel. I save the query as beginningbalance.dqy The
problem is when I try and re-run the query using "Get
External Data Run Saved Query. When I try and open
beginningbalance.dqy I get an error."Microsoft Query could
not open or read this query file. Either the file has been
damaged or the file format is invalid."
Do microsoft query files .dbq not allow the use of
aggragate functions?
Thanks