Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2006
    Posts
    3

    Unanswered: Count(Distinct(A||B)

    Hi,

    I am trying to run following query, but i am getting error:

    select Count(Distinct(A||B)) from Tab1;

    Can some one please help me to resolve this.

    Regards,
    Abhilasha

  2. #2
    Join Date
    May 2006
    Location
    Virginia
    Posts
    6
    what are you trying to do, select count ( distinct a OR b ) ?

  3. #3
    Join Date
    Dec 2003
    Location
    North America
    Posts
    146
    If you're trying to concantenate unique combinations of values for "A" and "B" in the SELECT statement, I don't think that's going to work.

    Try SELECT unique A, B, count(*)
    FROM some_table
    GROUP by 1,2
    HAVING count(*) > 1 <----- optional, depends on your needs
    ORDER by 1,2

Posting Permissions

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