perid_diff problem
Posted by:
jahar
Date: June 17, 2005 05:15AM
Hi,
Can someone help me with this query. I try to select all product within last 24 months but I get some errors
SELECT ID
FROM Purchases
WHERE PERIOD_DIFF( DATE_FORMAT( (
NOW( ) , "%y%m" ) ) , DATE_FORMAT( (
PurchaseDate
), "%y%m" )
) =24
LIMIT 0 , 30
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), DATE_FORMAT((PurchaseDate),"%y%m")) = 24 LIMIT 0, 30' at line
Subject
Written By
Posted
perid_diff problem
June 17, 2005 05:15AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.