Hi Dan,
Thanks for your answer. I think my problem is a little different.

When I receive a list Where for example company names and their addresse where 
listet more than 1 time,
I want them to be listet only once ( and I want to order them and I want to 
compute some of the fields )

Expl:

This is the my table ( there are 3 categories ):

Company - category   -  Phone  - Product   -  Unit
  ABC      - cat1         - 12345   -   TV         -   10
  ABC      - cat2         - 12345   -   LED       -   20
  VEX      - cat1          - 4456    -   LED       -   15
  VEX      - cat2          - 4456    -    TV        -   10
  SEM     - cat1          - 5588    -    TV         -   5
  ABC     - cat3          - 12345   -   LED       -   2

But I want to show the list  like this ( the companies shoud appear with their 
address information and computet units only once no matter in how may 
categories they are included ):

Company  -  Phone     -  Unit
  ABC       -  12345      -   32
  SEM      -    5588       -   5
  VEX       -    4456       -   25


I will be thankfull for your help


Fatih

 
  ----- Original Message ----- 
  From: Dan Powderhill 
  To: [email protected] 
  Sent: Friday, May 06, 2005 11:14 AM
  Subject: RE: [AspClassicAnyQuestionIsOk] How to group and order a recordset 
???


  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

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
      
    b.. To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[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/
 


Reply via email to