Getting MAX(value) into table

Results 1 to 3 of 3

Thread: Getting MAX(value) into table

  1. #1
    kimberlyj Guest

    Default Getting MAX(value) into table

    Hi All,<BR>Happy Monday! Okay- I have a weird problem and I know I am close but it just won&#039;t seem to work. I have an asp page connected to a SQL DB and need to get a MAX statement value to print on the page. All of my other ones (that are working fine) are being printed in a table by using:<BR>&#060;%=rs1.Fields("column").value%&#062 ; <BR><BR>My problem is with the 6th recordset:<BR>set rs6= conn.Execute("SELECT MAX(BAmount)FROM dbo.AucBids WHERE Bidder ="&"&#039;"& LogID & "&#039;" & "AND LotCode =" & "&#039;" & rs5.Fields("LotCode").value & "&#039;")<BR><BR>How do I get the MAX(BAmount) into the table? I tried using many different codes the last of which was:<BR>&#060;%=rs6.Fields(MAX("BAmount").value %&#062; which gave me an error of MAX being undefined.<BR><BR>Anyone know how to get this done?<BR>Thanks in Advance,<BR>Kimberly<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Getting MAX(value) into table

    Select Max(BAmount) AS Maximum<BR><BR>rs6.Fields("Maximum").value<BR><BR> Jason<BR>

  3. #3
    kimberlyj Guest

    Default Thanks!<eop>

    Worked like a charm!<BR>Kimberly

Posting Permissions

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