SQL Server Performance Forum – Threads Archive
select distinct , text column
Hi There When i try select distinct and one of the columns in the select clause is a text column this is not allowed , does anyone know a way around this, i would prefer not to convert it to a varchar field, but perhaps this is the only way??? Thanxhttp://www.umachandar.com/technical/SQL6x70Scripts/Main46.htm fyi. Satya SKJ
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
You need to convert it to varchar type and do query Madhivanan Failing to plan is Planning to fail
…with all the limitation that coma along with VARCHAR. That is you can only have the first 8000 characters from your TEXT column. —
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Heute schon gebloggt?http://www.insidesql.de/blogs
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)
Cool thanx guy, seems like Satya’s link will work, as long as the test column is not what makes it distinct. Thanx
Keep in touch with Umachander’s site for most valuable tips about SQL Server development. Satya SKJ
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
]]>