Skip to content

QBSync guide

How to get QuickBooks Desktop data into a SQL database

QuickBooks Desktop keeps its data in a company file that other software cannot query directly. If you want QuickBooks data in reports, dashboards or other systems, the first job is getting it into a real database. These are the options.

· 7 min read · By the Consus Solutions team

Option 1: export reports to Excel or CSV

Any QuickBooks report can be exported to Excel, then imported into a database. It is free and needs no software.

The catch is that it is manual and fragile: someone has to run it every time, report layouts are not tables, and line-level detail such as the items on each invoice is hard to get out cleanly.

Option 2: an ODBC driver

ODBC drivers for QuickBooks let tools like Excel or Access query the company file as if it were a database. That is useful for ad-hoc queries, but every query goes to QuickBooks itself, which is slow on large files, and reports stop working when QuickBooks is busy or closed.

Option 3: write your own integration

Intuit's QuickBooks Desktop SDK uses qbXML requests to read and write data. A developer can build exactly what you need — but it is a real project, with a schema to design, incremental logic to write and edge cases in every transaction type.

Option 4: a sync tool

A sync tool does the SDK work for you and maintains a copy of your QuickBooks data in SQL Server or MySQL. QBSync is one: it creates the tables, runs a full export the first time, and then fetches only changed records on a schedule.

Excel exportODBC driverCustom SDK codeSync tool
AutomaticNoOn demandYesYes
Line-item detailAwkwardYesYesYes
Load on QuickBooks during reportingNoneEvery queryDependsOnly during sync
Works when QuickBooks is closedYesNoDependsYes, for synced data
EffortOngoing manualLowHighLow

What a good QuickBooks schema looks like

Whichever route you take, the shape of the tables decides how easy reporting will be. Look for:

  • A header table and a line table for each transaction type — invoices and invoice lines, bills and bill lines.
  • QuickBooks' own IDs (ListID and TxnID) as keys, so joins are reliable.
  • A linked-transactions table, so you can see which payment applied to which invoice.
  • Modification timestamps, so incremental updates are possible.

Here is a query against QBSync's tables that lists the largest unpaid vendor bills:

sql
SELECT   vendor_fullname,
         refnumber,
         duedate,
         openamount
FROM     qb_bill
WHERE    ispaid = 0
ORDER BY openamount DESC;

Next steps

Pick the database your team already runs — see QuickBooks to SQL Server or QuickBooks to MySQL — and try the sync against your own company file with the free demo.

Try QBSync

A Windows utility that copies QuickBooks Desktop lists and transactions — every line item included — into Microsoft SQL Server or MySQL, and keeps them current with incremental, scheduled syncs.