sum of the column data of the same row

  • I have the following data.

    Number NameJanFebMarchApril

    1kk12131415

    2ll22232425

    3mm32333435

    4nn42434445

    IN the above data I need to sum values for jan,feb,march and aprl for the number and name and the result should be like the following.

    1 kk 54

    2ll94

    3mm134

    4nn174

    Any help would be greatly appreciated.

  • Hi,

    that's simple, just add these columns:

    SELECT Number, Name, Jan+Feb+March+April as Total

    FROM yourtable

    If this is not the correct solution, please explain what is the problem with it.

  • Hey,

    I am sorry. I found the solution ,ofcourse a simple one which is just to add the columns.

    Thanks.

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

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