Distinct count on text measures | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Distinct count on text measures

How can I obtain a distinct count aggregation on a text fact table coloum? I tried to add a CheckSum calculated coloumn to my fact table, but OLAP return strange results.

Pretty sure that you can’t… Unless you convert it to varchar(8000) in the query… Cheers
Twan
I also want to distinct count text file How do we use varchar(8000) in query , could you please explain thx

you can do a
select count( distinct convert( varchar(8000), textcol ) ) from table Though this will only check the uniqueness of the first 8000 characters Cheers
Twan
]]>