Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : How do I join the Invoice table to the InvoiceLine?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
 How do I join the Invoice table to the InvoiceLine? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-22 12:39:18
SELECT * FROM {OJ Invoice INNER JOIN InvoiceLine ON (Invoice.TxnID = InvoiceLine.TxnID)}

But, this is not
necessary. In QODBC all the children tables, like InvoiceLine contain all the fields from the Invoice (parent table). Simply do your select using InvoiceLine and reference the same fields you would in the Invoice table. This will increase your performance by many times.

A general rule of thumb. If you need to reference any field from a table that has the child table name in it, like InvoiceLineItemRefListID, then use the child table (InvoiceLine) otherwise use the parent table (Invoice). This applies to all the other parent, child (line and txn) tables.
 

  Top 
 New Topic 
 
 Post Reply 

Jump to