Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    15

    Unanswered: Select query to get last 6 months data

    Hi,
    I need to write a select query to get last six months data from a table , on monthly wise.Can anyone help me in writing this query
    I am using sql server 2000.

    eg: Jan...data
    feb...data

    TIA,
    Ravi

  2. #2
    Join Date
    Sep 2004
    Posts
    2
    Hi.

    Take a look at the dateadd() function. Using it along with the getdate() function should do the trick

    Hjoellund

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •