urgent please

  • try this

    select distinct(week_number), sum(total)

    from 'your table'

    thats what u need?

    by the way r u SRG's pinky?

  • Not sure that distinct will work without a group by... this may work better :

    Select Week_number, sum(Total) from dbo.YourTable group by week_number

    BTW, why r u keeping the week number in the table??

    This is something that you can easyly calculate from the date.

  • HEY THE TOTAL FIELD IS THE COUNT FIELD WHICH I GOT IT FROM OTHER TABLE

  • hey i have these fields

    month,year,week_number, total(this is the count of a field in other table)

     

  • The can post the table definition with some sample data so we can create the correct query this time.

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

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