How to get the records from table only month wise, day wise, year wise.
If the records are arrange in the form of dd-mm-yyyy.
[B]Question asked by visitor sunil bansal[/b]
Printable View
How to get the records from table only month wise, day wise, year wise.
If the records are arrange in the form of dd-mm-yyyy.
[B]Question asked by visitor sunil bansal[/b]
Could you rephrase the question? Are you trying the select on a specific month, day or year? Or could you be trying to reformat the key for output?
kk
Sunil ,
Did you mean that you want fetch records only for perticular month / year / day?
If yes,
To get the records for for perticular month
Select * from my_table where month(my_date_Column)= month_i_want.
Similarly for year ,
Select * from my_table where Year(my_date_Column)= Year_i_want.
HTH :)
Regards,
Hi,
The only thing to remember here is when your are using the Select * and it returns multiple rows ensure to use cursor. Otherwise the program would not work.
Regards,
Bhagi