Get Monthly total in sp

  • I want to select all columns and get monthly total in my table.

    how am i do this...

    plz help me...

  • Please read the first article in my signature on how to ask a question in this forum.

    It'll show you how to post table def and sample data in a ready to use format.

    Also, please include your expected output (not as jpg) and what you've tried so far.

    Right now it looks like homework...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • ruwanwickrama (12/16/2010)


    I want to select all columns and get monthly total in my table.

    how am i do this...

    plz help me...

    Is this you are looking for

    Select Project ,Location,Itemtype,Sum(Amount) From mytable Group by Project ,Location,Itemtype,MONTH(Date)

    Thanks

    Parthi

    Thanks
    Parthi

  • Thanx Parthi,

    Your answer very helpful to me...............

    😉

  • parthi-1705 (12/17/2010)


    ruwanwickrama (12/16/2010)


    I want to select all columns and get monthly total in my table.

    how am i do this...

    plz help me...

    Is this you are looking for

    Select Project ,Location,Itemtype,Sum(Amount) From mytable Group by Project ,Location,Itemtype,MONTH(Date)

    Thanks

    Parthi

    This will work as long as your data does not span more than 12 consecutive months.

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

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