I have a question, I would like to find all the records from a table which is the date of the match and the year, in all the months , For example
date (mm / day / year):
'12 / 24/2010 ' Withdraw all records together:
'12 / 24/2010 ''11 / 24/2010' '10 / 24/2010 ''09/24/2010 '08 / 24/2010 ''07 / 24/2010' '06 / 24/2010 ''05 / 24/2010' '04 / 24/2010 ''03 / 24/2010' '02 / 24/2010 ''01 / 24/2010' Is there any way to do this in the same question? I want to implement it in a function, but would prefer not to use a loop (only for speed) Any help would be greatly appreciated !!
Assume that your column is defined as DATE Functionally, you must be sure to type my_table WHERE to_char (date_column, 'DD-YYYY') = to_char (date '2010-12-24', 'DD-0') from SELECT * YYYY ') You can potentially query to_char (date_column,' DD-YYYY ') ) to make the query more efficient Can create an index based
No comments:
Post a Comment