Converting access to ASP

Results 1 to 2 of 2

Thread: Converting access to ASP

  1. #1
    Join Date
    Dec 1969

    Default Converting access to ASP

    &nbsp;<BR>I am trying to get this statement into a SQL statement so I can manapulate it in ASP:<BR><BR>Sum([Units].[NumberOfUnits]*[AverageRentUnits])/Sum([Units].[NumberOfUnits])<BR><BR>Would it be something like:<BR><BR>SELECT Sum(total)<BR>FROM UNITS<BR>WHERE TOTAL = (NUMBEROFUNITS * AVERAGERENTUNITS)/ NUMBEROFUNITS)<BR><BR>Am I close???<BR>TOTAL =

  2. #2
    Join Date
    Dec 1969

    Default Ummmm

    Sum(tota) will only add up all of the totals where your total is equal to (numberofunits * averagerentunits)/numberofunits)<BR><BR>You should be able to use your sum query in a select clause like this...<BR><BR>select Sum([Units].[NumberOfUnits]*[AverageRentUnits])/Sum([Units].[NumberOfUnits]) from units<BR><BR>-- Whol

Posting Permissions

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