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 : Sort the rows by sum of balanceSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Sort the rows by sum of balance 
 Author   Message 
  njbox 
  
 Group: Members 
 Posts: 3 
 Joined: 2008-02-20 
 Profile
 Posted : 2008-02-21 06:11:59
Is there a way to do the following

SELECT Invoice.CustomerRefFullName, Sum(Invoice.SubTotal) AS SumOfSubTotal
FROM Invoice
where ispaid=0
GROUP BY Invoice.CustomerRefFullName
ORDER BY sum(invoice.subtotal)

When I try this query it gives me
java.sql.SQLException: [QODBC] Expected lexical element not found: <identifier>

Thanks
Nilesh 

 
<a href="http://www.infocaptor.com">Executive Dashboards</a>
 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-02-21 22:27:21

You can't do a ORDER BY on an expression or function, but the current balance is already held and maintained by QuickBooks in the Customer table:

SELECT FullName, Balance FROM Customer

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to