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 narrow a query to a date range to make it run faster with less data?Search Forum

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

 New Topic 
 
 Post Reply 
 How do I narrow a query to a date range to make it run faster with less data? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-22 13:04:39

Examples:
SELECT * FROM Invoice WHERE TimeModified = {ts'2002-09-25 11:54:25.000'}
SELECT * FROM Invoice Where TxnDateMacro = 'LastMonth'
SELECT * FROM Invoice Where TxnDate = {d'2003-12-23'}
SELECT * FROM Invoice WHERE TimeModified >= {ts'2002-09-25 00:00:00.000'}
AND TimeModified <= {ts'2002-09-26 00:00:00.000'}

Use this format for Microsoft Access queries:
SELECT * from InvoiceLine WHERE Txndate >= #2005-09-23#
SELECT * FROM InvoiceLine WHERE Invoice.TimeModified >= #2003-09-23 00:00:01#

The Access format may vary based on the setting for your default date format for your region in your Windows control panel.

 

  Top 
 New Topic 
 
 Post Reply 

Jump to