Problem with ASP and Access

Results 1 to 3 of 3

Thread: Problem with ASP and Access

  1. #1
    Memo Guest

    Default Problem with ASP and Access

    Hello!<BR>This is my problem:<BR><BR>I have this database in Access<BR>Name: Ene99<BR>-------------------<BR>IDR Name Price<BR>1 A 25<BR>1 B 15<BR>1 C 18<BR>2 D 10 <BR>3 E 35<BR>3 F 40<BR>--------------------<BR><BR>With this SQL command i can display a table in ASP page:<BR>"SELECT * FORM Ene99 where IDR = &#039"Request("IDR")"&#039"<BR>If IDR = 3, the table result is:<BR><BR>----------------<BR>3 E 35<BR>3 F 40<BR>----------------<BR><BR>But i need display a table whit all the fields agroup for IDR and Price<BR><BR>Somthing like this:<BR><BR>---------------<BR>IDR SumPrice <BR>1 58<BR>2 10<BR>3 75<BR><BR>-------------<BR><BR>I treat whit this command "SELECT * FORM Ene99 GROUP BY IDR AND PRICE", but I getting error.<BR><BR>What can i do?<BR><BR>Thanks...

  2. #2
    Join Date
    Dec 1969

    Default RE: Problem with ASP and Access

    "SELECT Ene99.IDR, Sum(Ene99.Price) AS Sum FROM Ene99 GROUP BY Ene99.IDR;"<BR><BR>Hope this Helps... Cheers!<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Problem with ASP and Access

    Use this SQL statement:<BR><BR>SELECT * FROM ene99<BR>ORDER BY IDR, Price<BR><BR>That should do the trick! Also, be sure to check out the SQL FAQ on 4Guys for some insight on the SQL language:<BR><BR><BR><BR>Happy Programming!

Posting Permissions

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