Partation by Day in sql server 2005

  • This isn't the article I was thinking about, but it would definately be one worth reading for your project as well:

    http://msdn.microsoft.com/en-us/library/ms345146(SQL.90).aspx.

  • Hi Lynn,

    Thanks for the link. I was reading that article a while ago.. but trying Sarabpreet solution in parallel :-).

    Thanks,

    Brijesh

  • Hi Brij,

    See we've used the following as a range substring(convert(varchar,getdate(),112),1,6)+'01')

    Now this will obviously put all the data of last month in first partition because we are taking here getdate() what you can do is take the column name where you are inserting date value in place of getdate() function and then use it,It Should work.

    write now i dont have time to test this but i am damm sure it will solve your problem.

    and do some R&D.;-) IT helps a lot.

    Regards,
    Sarabpreet Singh 😎
    Sarabpreet.com
    SQLChamp.com
    Twitter: @Sarab_SQLGeek

Viewing 3 posts - 16 through 17 (of 17 total)

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