I'm pretty new in Oracle and I want count data from first day and last day of this month (dynamically).
My PHP code look like this :
$date = Date('d-M-y');
// Query
$query = "Select COUNT(*) FROM myTable WHERE CREATED
BETWEEN FIRST_DAY(TRUNC(TO_DATE(".$date."), 'MON')) AND
LAST_DAY(TRUNC(TO_DATE(".$date."), 'MON'))";
But I always get the error
ORA-00904: "NOV": invalid identifier
Which NOV
is the correct month -right?