Alright, so I've checked many many many other posts on stackoverflow to see if this is mentioned anywhere, and the answers provided don't quite make sense to me...I'm thinking they're talking about something completely different.
Here's what I want to do, using Oracle SQL Developer:
-Retrieve entries from purch_date
-Get the difference IN DAYS between the purch_date and Christmas of the CURRENT YEAR
**So, therefore '2012' can't be hard-coded in there. I need to retrieve it.
Here's the query that works 100% in MySQL:
SELECT purch_id AS PURCH_ID,
DATEDIFF(CONCAT(YEAR(NOW()),'-12-25'), purch_date) AS DAYS_TO_CHRISTMAS
FROM CS260USER.candy_purchase;
Pretty much, I need that to work in Oracle.
Can anyone help me with this?
Many many thanks!
-Matthew