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 : About data in QB: Time frame information - Sales by Hour reportingSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 About data in QB: Time frame information - Sales by Hour reporting 
 Author   Message 
  maxstock 
  
 Group: Members 
 Posts: 1 
 Joined: 2009-02-24 
 Profile
 Posted : 2009-02-24 01:58:07
This is a no technical question but one I need to answer myself before jumping into QODBC. I'm considering start working with QODBC to get information we can't get easily from QuickBooks reports. What I would like to ask people working with QODBC and QB and QB POS is if QODBC is able to access and work with information related to time of purchases. For exampe view items that sell the most at 11 AM or between 4 and 5 PM and also see what those itemas are. I don't know if this information is located on the QB or the QB POS file. If someone could tell me If I could I access this type information,  I could start working with QODBC. I would appreciatte any help.

Thank you

Max. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2009-02-24 11:29:37

Actually that's pretty easy:

SELECT {fn HOUR(TimeCreated)} as Hour, SalesLineQuantity as Qty, Type, RefNumber as Num,
SalesLineItemRefFullName as Item, SalesLineDesc as Memo, SalesLineRate as SalesPrice,
SalesLineAmount as Amount, TimeModified, CustomFieldContract as Contract#
FROM SalesLine NOSYNC where (TxnDate >= {d'2007-12-01'} and TxnDate <={d'2007-12-31'})
and {fn CONVERT( {fn HOUR(TimeCreated)}, SQL_VARCHAR)} = '22'
and SalesLineType='Item' and SalesLineItemRefFullName is not null
and SalesLineQuantity > 0
order by SalesLineQuantity DESC, SalesLineItemRefFullName

Where '22' is the hour using 24 hour format
           (TxnDate >= {d'2007-12-01'} and TxnDate <={d'2007-12-31'}) is the start and end date for the report

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to