RETURN MONTH [message #443758] |
Wed, 17 February 2010 04:26  |
mamalik
Messages: 270 Registered: November 2008 Location: Pakistan
|
Senior Member |

|
|
DEAR ALL,
I need a query to whome i will pass month in number and that should return name of month. If i input 1 it should return Jan,2,Feb but don't use decode etc.
Is there any query with Julian format or any other date function?
I dont want to use ,Case and Decode ,level etc.
Regards.
Asif
|
|
|
Re: RETURN MONTH [message #443759 is a reply to message #443758] |
Wed, 17 February 2010 04:30   |
 |
ramoradba
Messages: 2457 Registered: January 2009 Location: AndhraPradesh,Hyderabad,I...
|
Senior Member |
|
|
SQL> select to_char(to_date('&mm','MM'),'Mon') from dual;
Enter value for mm: 1
old 1: select to_char(to_date('&mm','MM'),'Mon') from dual
new 1: select to_char(to_date('1','MM'),'Mon') from dual
TO_
---
Jan
SQL> /
Enter value for mm: 2
old 1: select to_char(to_date('&mm','MM'),'Mon') from dual
new 1: select to_char(to_date('2','MM'),'Mon') from dual
TO_
---
Feb
SQL> /
Enter value for mm: 3
old 1: select to_char(to_date('&mm','MM'),'Mon') from dual
new 1: select to_char(to_date('3','MM'),'Mon') from dual
TO_
---
Mar
SQL>
You better read the documents first.
sriram
|
|
|
|