var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Month value in SQL
Does anyone know how to get the month field from a date in a SQL statement? I am using Oracle 8.0
There is a field called "birth_date" in my table and I have to print the number of records group by month as follows:
I need the month value in 1-12 format. Please help..
group by month(birth_date)
There is not "month" function in Oracle!
that shoulde be:
select to_char(brith_day,'mm'),count(*) from yourtable group by to_char(brith_day,'mm')
select to_char(sysdate,'MON') from dual;
will return today's month
MONTH() is ANSI/ISO standard sql
my apologies, Chinna, i overlooked the fact that you said oracle 8
oracle corp, in its infinite wisdom, apparently did not begin supporting standard sql until release 9