Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2004
    Posts
    191

    Unanswered: Help with query....

    Please see query below:


    SELECT COUNT(DISTINCT target) FROM iislog where target like '%answeringservice%'

    The result of the query is 71, is there a way to list the values out in the output of the query.

    for example: /answeringservice/default.asp = 3200
    /answeringservice/deny.asp = 3700


    Thanking you all in advance.

    Lystra

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yes

    SELECT DISTINCT target FROM iislog where target like '%answeringservice%'
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2004
    Location
    York, PA
    Posts
    95
    No

    SELECT DISTINCT target, Count(target) as 'total' FROM iislog where target like '%answeringservice%'
    Group By target

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the question was "is there a way to list the values out in the output of the query"

    so you're saying it's not possible, white knight?



    by the way, when you use GROUP BY, the DISTINCT is redundant
    Last edited by r937; 12-14-04 at 12:12.
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Dec 2004
    Location
    York, PA
    Posts
    95
    Yes it's possible

    The code given did not do it!
    sorry If I confused the issue

  6. #6
    Join Date
    Jul 2004
    Posts
    191
    White Knight, the code work well, thanks

    Lystra

Posting Permissions

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