Split the data into monthly

  • Hello room,

    I have three year of data with time stamp (2009-07-01 03:55.07.678) on it.

    I wanted to split those data into a month per year.

    How can I do that? Can somone give me lights?

    Thanks,

    TJ

  • What is the Datatype you have? Is it Timestamp Datatype or Datatime Datatype that you are using as a timestamp.

    You can implement it using Database Partitioning.

    Follow the link http://www.learnsqlwithbru.com/Database%20Partitioning%20in%20SQL%20Server%202005.htm


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • You might want to look at the date part function in Books On Line:

    DATEPART (Transact-SQL)

    ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/15f1a5bc-4c0c-4c48-848d-8ec03473e6c1.htm

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Edwin-376531 (11/16/2009)


    Hello room,

    I have three year of data with time stamp (2009-07-01 03:55.07.678) on it.

    I wanted to split those data into a month per year.

    How can I do that? Can somone give me lights?

    Thanks,

    TJ

    As you can see from the 2 vastly different answers that you've got so far, your question is a bit unclear. You want to 'split' the data? What does that mean, storage, querying? What problem are you facing that makes you think the data needs 'split'? Can you give us an example of what you are trying to do?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply