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 > distinct count of 2 attributes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-09-08, 12:45
Debbie1596 Debbie1596 is offline
Registered User
 
Join Date: Sep 2008
Posts: 1
distinct count of 2 attributes

Does anyone know how to do a distinct count of 2 attributes from the same table?

I get an syntax error msg when I try to do this.

Thank you
Reply With Quote
  #2 (permalink)  
Old 09-10-08, 04:59
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
As far as I know, you can't do something like this:

select count(distinct col1,col2) from table;

try this:

select distinct col1, col2 from table into temp temp_table with no log;
If you are working in dbaccess, you get the actual count after execution, if you are not:
select count(*) from temp_table;
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