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 do a subquery in FROM clause?Search Forum

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

 New Topic 
 
 Post Reply 
[1]  
 How do I do a subquery in FROM clause? 
 Author   Message 
  PH 
  
 Group: Members 
 Posts: 41 
 Joined: 2007-02-02 
 Profile
 Posted : 2008-11-07 15:45:15

select * from (select shipdate,  {fn timestampadd(SQL_TSI_WEEK, 4,  {fn CONVERT(ShipDate, SQL_DATE)} ) } as Tdate from salesorder nosync where IsManuallyClosed = false and isfullyinvoiced = false and termsreffullname like '%30%' and customerreffullname like 'XYZcompany%' ) where Tdate > {d'2008-09-02'}

If this syntax not supported, what I'm trying to do is select the sales orders where the [shipdate+4 weeks] falls into a specified date range.

Thanks.

 

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-11-07 16:48:24

Try:

select shipdate, ( {fn CONVERT(ShipDate, SQL_DATE)}  + 28) as shipplus28days
from salesorder nosync
where IsManuallyClosed = false and isfullyinvoiced = false
and termsreffullname like '%30%' and customerreffullname like 'XYZcompany%'
and ( {fn CONVERT(ShipDate, SQL_DATE)}  + 28) > {d'2008-09-02'}

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to