Summing up values---pls help

Results 1 to 2 of 2

Thread: Summing up values---pls help

  1. #1
    Join Date
    Dec 1969

    Default Summing up values---pls help

    Hi all!!<BR><BR>Can anyone helping out in getting up the summed values of these:<BR><BR>I have 3 tables in my DB:<BR><BR>PROJECT_MASTER(PROJECT_ID,PROJECT_NAME, PROJECT_DESC)<BR>PROJECT_DETAILS(PROJECT_ID,P2,P3, P4,COUNTRY_ID)<BR>COUNTRY_MASTER(COUNTRY_ID,COUNTR Y_NAME)<BR><BR>PROJECT_MASTER<BR>---------------------<BR>PROJECT_ID PROJECT_NAME PROJECT_DESC<BR>1 TESTNAME TEST DESC<BR>2 TESTNAME1 TEST DESC1<BR><BR><BR>PROJECT_DETAILS<BR>-----------------------<BR>PROJECT_ID P2 P3 P4 COUNTRY_ID<BR>1 10 20 10 5<BR>1 11 12 10 6<BR>1 5 6 2 1<BR><BR><BR>What I need is when user clicks on the link in my ASP page on ProjectID 1 I need to give the sum(p2),sum(p3),sum(p4) for all the countries<BR>where project_id=1..<BR><BR>How can this be done..<BR><BR>Pls help<BR><BR>Regards<BR>Vals

  2. #2
    Join Date
    Dec 1969

    Default select it...

    select sum(p2),sum(p3),sum(p4) from project_Details where country_id = 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts