1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Calculate percentage from two recordsets

Discussion in 'C#' started by skwilliamson, Mar 24, 2006.

  1. #1
    I have two recordsets (rsWk) and (rsPvsWk) each pulling a different figure for the field (Mc). I have a separate space on the ASP within another table for logging the percentage increase/decrease between the two.
    Do I create a text box to display the data in the table?

    How do I create this calculation?

    I'm not fluent in ASP so I may need help in positioning the code.

    skwilliamson, Mar 24, 2006 IP
  2. vectorgraphx

    vectorgraphx Guest

    Likes Received:
    Best Answers:
    Trophy Points:
    something like this should work:
    <% av = rsWk("Mc")
    av2 = rsPvsWk("Mc")
    aver = (av2/av) * 100
    aver2 = (av/av2) * 100
    response.write "first percentage: " & aver &"%<br>"
    response.write "second percentage: " & aver2 &"%<br>"
    Code (markup):
    just write in your wording for "aver" and "aver2" wherever in your web page you wish to display it.

    vectorgraphx, Mar 24, 2006 IP