If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Count(Distinct(A||B)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-30-06, 06:12
abhilashapatil abhilashapatil is offline
Registered User
 
Join Date: Feb 2006
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 05-30-06, 09:48
fwellers fwellers is offline
Registered User
 
Join Date: May 2006
Location: Virginia
Posts: 6
what are you trying to do, select count ( distinct a OR b ) ?
Reply With Quote
  #3 (permalink)  
Old 05-30-06, 12:58
mjldba mjldba is offline
Registered User
 
Join Date: Dec 2003
Location: North America
Posts: 139
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On