So if I understand you correctly you want a list of company names which
belong to a given category? If so, this SQL should get it for you :-
rs.open "SELECT DISTINCT company FROM tblCompany WHERE category='" &
request.form("category") & "' ORDER BY company ASC;"
Dan
________________________________
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of
fatih_zeren1962
Sent: 06 May 2005 07:43
To: [email protected]
Subject: [AspClassicAnyQuestionIsOk] How to group and order a recordset
???
Hello friends,
I am a new ASP user and a have a problem.
I have a data base with a lot of compan names which can appear more
than one time.
Example:
company: ABC
category: A
product: TV
company: ABC
category: A
product: Radio
company: Bosch
category: B
product: LED
company: Simens
category: A
product: TV
Now I want to list this records by "category" ( company ABC should
then appear only one time ).
I try:
Rs.Open "select * from TblCompany where category= '" & Request.Form
("category") group by category", Con
but I allways receive an error message.
How do I correctly use
- Order by
- Compue Sum
Thanks a lot
________________________________
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
subscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/