Results 1 to 4 of 4

Thread: Get records from table month, day, year wise.

  1. #1
    Geek_Guest
    Guest

    Get records from table month, day, year wise.

    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.

    Question asked by visitor sunil bansal


  2. #2
    Contributing Member
    Join Date
    May 2007
    Answers
    85

    Re: Get records from table month, day, year wise.

    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


  3. #3
    Junior Member
    Join Date
    May 2007
    Answers
    16

    Re: Get records from table month, day, year wise.

    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,


  4. #4
    Junior Member
    Join Date
    Nov 2009
    Answers
    1

    Re: Get records from table month, day, year wise.

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact