Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date function

Status
Not open for further replies.

LucasH

IS-IT--Management
Oct 28, 2003
93
0
0
US
HI I am running Pervasive SQL 9.1 and am just trying to run a a query that grabs all transactions between now and 4 months ago. This query is run as an Access pass-through query. Is there a dateadd function or something in 9.1?

My attempt is the following

SELECT * FROM order where docdate > CONVERT(CONVERT(CURRENT_DATE(),SQL_INTEGER)-150)),SQL_DATE)

I get errors about a restricted data type attribute violation or something. Anybody have any ideas?
 
Something like this should work:
Code:
SELECT * FROM order where docdate > CURRENT_DATE() - 150


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
uh, yeah, that definitely worked. I thought WAY too hard about this one. I am a little embarassed :).

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top