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 : Errors using date functions in WHERE clauseSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Errors using date functions in WHERE clause 
 Author   Message 
  Charles Calvert 
  
 Group: Members 
 Posts: 2 
 Joined: 2008-01-17 
 Profile
 Posted : 2008-01-17 10:43:20
I'm trying to use date functions in the WHERE clause to limit the result set by transaction date.  I found this thread <http://www.qdeveloper.com.au/forum.php?homeinclude=topicdetails&forum_id=1&category_id=17&post_id=342>, which shows exactly what I want, but when I execute that query (I copied it and pasted it right into the query tool, so it's not a typo), I get the following error:

<eb1>Error
State:S0000,Native:10004,Origin:[QODBC]</eb1>

The text of the query is:

SELECT {fn CURDATE()} as Today, ({fn CURDATE()}-30) as "30 Days Ago",
TxnDate, RefNumber, InvoiceLineDesc
FROM invoiceline WHERE TxnDate >= ({fn CURDATE()}-30)

I'm using QuickBooks Enterprise Solutions Contractor Edition, version 7 with QODBC version 7.00.00.214

Has anyone seen this before? 

 
Charles 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-01-17 13:58:59

Sorry, you didn't say what query tool you are using. Both VB Demo and Microsoft Query run the query without any problems:

See:How do I use the VB Demo for testing? 

 

  Top 
  Charles Calvert 
  
 Group: Members 
 Posts: 2 
 Joined: 2008-01-17 
 Profile
 Posted : 2008-01-29 07:03:25
I'm using QTODBC <http://gpoulose.home.att.net/> for testing and a DTS package in MS SQL Server 2000 for production.  Interestingly, the syntax worked in the DTS package. 

 
Charles 
 
  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to