How to Save Data Retrieved from Pass Thru Query

S

Shea Schultze

MS Access 2003
QuickBooks Enterprise Solutions 7.0

Connection String:
ODBC;DSN=QuickBooks Data;SERVER=QODBC;OptimizerDBFolder=C:\Documents and
Settings\Shea\Application Data\QODBC Driver for
QuickBooks\Optimizer;OptimizerCurrency=O;IAppReadOnly=Y

The query is:
SELECT ClassRefFullName as Class, CustomerRefFullName as Name, TxnDate as
Date, RefNumber as Num, Memo, BalanceRemaining as OpenBalance
FROM Invoice
WHERE IsPaid = 0 and ClassRefFullName is not null
ORDER BY ClassRefFullName, CustomerRefFullName, TxnDate

This query returns just the information we need. I would like to then write
this data to a table. How?

I've tried combining this script with a make-table query and have been
crawling other user groups but to no avail. Please please please provide
some guidance.
 
M

Mark Burns

....or you could also just do this:

SELECT ClassRefFullName as Class, CustomerRefFullName as Name, TxnDate as
Date, RefNumber as Num, Memo, BalanceRemaining as OpenBalance
INTO myNewTableNameHere (optional: IN C:\MyPathName\MyExternalDBNameHere.mdb )
FROM Invoice
WHERE IsPaid = 0 and ClassRefFullName is not null
ORDER BY ClassRefFullName, CustomerRefFullName, TxnDate
 
S

Shea Schultze

Tried this and failed... I've heard that Pass-Thru queries don't like INTO
because the Pass-Thru commands are being executed on the server. It works
fine to have the Pass-Thru query as the basis for a Make-Table query. It can
be a little tricky to work with because when you open in Design view, it runs
the Pass-Thru before you are able to stop it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top