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 : Accessing Class Information from TransactionsSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 Accessing Class Information from Transactions 
 Author   Message 
  darcy 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-11-01 
 Profile
 Posted : 2007-11-01 09:35:38

Hi there,

I'm trying to obtain a listing of Transactions with their associated Class values. I've read that you can use the Stored Procedures (like sp_report ProfitAndLossbyClass threads in the Forum).

However, I'm trying to use direct SQL statements via QODBC. Here's an example I'm working with to isolate the Design Income transactions for the standard Profit and Loss by Class report for Rock Castle Construction (seeing the transactions that add up to $36,729.25)

SELECT  Account.AccountNumber, Account.Name, Account.FullName, Account.AccountType, Transaction.TxnDate, Transaction.AccountRefListID,Transaction.AccountRefFullName, Transaction.EntityRefListID,Transaction.EntityRefFullName,Transaction.RefNumber,Transaction.Amount  FROM Account INNER JOIN Transaction  ON Account.ListID = Transaction.AccountRefListID WHERE Account.AccountNumber = '40110' AND Transaction.TxnDate >= {d'2011-01-01'} AND Transaction.TxnDate <= {d'2011-12-15'}

This query gets me almost everything I need.. except for the Class values - so I could see what portion is "New Construction" or "Remodel".

Can you please advise on how (or if) this is possible to achieve?

Many thanks in advance. Good site!

D'Arcy..

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-11-01 09:44:25

The Transaction table doesn't show the Class but it can be seen using a CustomTxnDetail report instead like this:-

sp_report CustomTxnDetail show Text, Blank, TxnType, Date, RefNumber, Name, Memo,
Account, ClearedStatus, SplitAccount, Class, Debit, Credit, RunningBalance
parameters DateMacro = 'ThisMonthToDate', SummarizeRowsBy = 'TotalOnly',
OpenBalanceAsOf = 'Today'

See: How do I run a CustomTxnDetail Report? for more information.

 

  Top 
  Tom S 
  
 Group: Members 
 Posts: 3 
 Joined: 2008-04-02 
 Profile
 Posted : 2008-04-03 01:29:16

Connection String:  Driver={QODBC Driver for QuickBooks};DFQ=[QuickBooks Filename];OpenMode=M;OLE DB Services=-2

SQL Statement 1:     sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class parameters DateMacro = 'All', SummarizeRowsBy = 'Account'

SQL Statement 2:     sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class parameters DateMacro = 'ThisMonthToDate', SummarizeRowsBy = 'TotalOnly', OpenBalanceAsOf = 'Today'

 

I am trying to pull ALL transaction records from a 2007 QBW file from the begining of the file until present day using the Connection String above.  I tested with SQL Statement 2 and it appears to have worked.  However when I change it to SQL Statement 1 it does not return any values and appears to enter a continuous loop.  What should my SQL statement look like to retrieve the records I want?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-04-03 08:46:15

This can take a long time depending on the amount of transaction rows that will be returned. Try breaking the report into year by year chunks like this instead:

sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class
parameters DateFrom = {d'2005-01-01'}, DateTo = {d'2005-12-31'},
SummarizeRowsBy = 'Account'

sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class
parameters DateFrom = {d'2006-01-01'}, DateTo = {d'2006-12-31'},
SummarizeRowsBy = 'Account'

sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class
parameters DateFrom = {d'2007-01-01'}, DateTo = {d'2007-12-31'},
SummarizeRowsBy = 'Account'

sp_report CustomTxnDetail show Date, Account, AccountType, Amount, Class
parameters DateFrom = {d'2008-01-01'}, DateTo = {d'2008-12-31'},
SummarizeRowsBy = 'Account'

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to