dbTalk Databases Forums  

why can we not use Distinct Count with Char types

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss why can we not use Distinct Count with Char types in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dharmesh Kalyna
 
Posts: n/a

Default why can we not use Distinct Count with Char types - 11-02-2003 , 08:34 PM






I need to use field type of Char as the source for
distinct counts within a Cube.

The SQL BOL states that if using distinct counts, you
could use OLEDB datatypes of:
DBTYPE_BYTES,DBTYPE_HCHAPTER,DBTYPE_STR,DBTYPE_WST RDBTYPE_S
TR as measures.
is IBM DB2 Datatype of Char, or Varchar not part of the
above datatypes?
Seems that Distinct Counts can only be used with datatypes
of Int.

I need to make it work with a Char field type which is the
datatype of one of the foreign keys.

Any ideas

Thanks
Dharmesh Kalyan

Reply With Quote
  #2  
Old   
Sanka
 
Posts: n/a

Default why can we not use Distinct Count with Char types - 11-03-2003 , 05:40 AM






Hi Dharmesh,

You are correct. For DISTINCT COUNT measure, the datatype
should be INT.

May be you can add a new column which holds a numeric
value for each CHAR value in the exisitng column and have
the DISTINCT COUNT aggregation type on the newly added
numeric column.

Cheers,
Sanka

Quote:
-----Original Message-----
I need to use field type of Char as the source for
distinct counts within a Cube.

The SQL BOL states that if using distinct counts, you
could use OLEDB datatypes of:
DBTYPE_BYTES,DBTYPE_HCHAPTER,DBTYPE_STR,DBTYPE_WST RDBTYPE_
S
TR as measures.
is IBM DB2 Datatype of Char, or Varchar not part of the
above datatypes?
Seems that Distinct Counts can only be used with
datatypes
of Int.

I need to make it work with a Char field type which is
the
datatype of one of the foreign keys.

Any ideas

Thanks
Dharmesh Kalyan
.


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.