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 : Unique key in SalesbyItemDetailSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Reporting Forum

 New Topic 
 
 Post Reply 
[1]  
 Unique key in SalesbyItemDetail 
 Author   Message 
  MikeD 
  
 Group: Members 
 Posts: 14 
 Joined: 2006-10-04 
 Profile
 Posted : 2006-12-04 16:04:43

What would be either a unique field or a unique combination of fields in the report SalesbyItemDetail (with reference to data rows)? I am loading report results into a SQL table and want to define a key column for updating purposes. Thanks!

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-04 21:57:59

This is a report, not a table export, but for:

sp_report SalesByItemDetail show TxnID, RowNumber, TxnType, Date, RefNumber,
Memo, Name, Item, ItemDesc, Quantity, UnitPrice, Amount, RunningBalance
parameters DateMacro = 'All' where RowType='DataRow'

RowNumber would make a good unique key and TxnID and RowNumber would make a good lookup.

 

  Top 
  MikeD 
  
 Group: Members 
 Posts: 14 
 Joined: 2006-10-04 
 Profile
 Posted : 2006-12-05 01:50:16

Hi Tom, not sure if this will work, though. I understand that one invoice, for instance, is considered one transaction. That means all line items on this invoice will have the same TxnID, correct? I might use a combination of TxnID and Item, if there is no identifier per line item that can be pulled through the report.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-05 09:03:09

I had hoped that TxnID was the InvoiceLineTxnLineID, but you're right, it's the TxnID of the Invoice. Item, won't work either as items can be invoiced within an invoice multiple times, so I changed my previous answer to RowNumber

We have asked Intuit for a unique key in all their reports.

 

  Top 
  MikeD 
  
 Group: Members 
 Posts: 14 
 Joined: 2006-10-04 
 Profile
 Posted : 2006-12-06 03:50:59

Tom, RowNumber won't work either. It identifies a unique line item in the report itself, but I am looking for an identifier of the underlying record that it's pulling. As running an update on a report (e.g. with "ThisMonthToDate") will yield different row numbers each time,  I can't use it to update the fields in the target SQL table. Sorry if I haven't communicated this correctly.

An alternative I could think of is executing the SQL underlying the sp_report and including columns that don't come standard with the report. Is it possible to do that and can you share the content of the stored procedure?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-06 08:18:16
Sorry, only a limited number of fields are exposed in each of the QuickBooks reports that we call using our stored procedure sp_report. We are simply calling the QuickBooks reporting engine here, so any changes need to be done by Intuit, not us. The only way of doing what you want is, for example, read in the report and then locate the line of each invoice in the InvoiceLine table and extract the InvoiceLineTxnLineID. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to