Getting External Data

  • Thread starter Thread starter Andrew
  • Start date Start date
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
 
Andrew said:
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?

Where did the .dbq file come from?! You can view the contents of your
..dqy file in a text editor e.g. notepad (so I doubt the use of
aggragate functions is an issue) and doing so may reveal any problem
with the file.

Jamie.

--
 
Back
Top