Link to home
Start Free TrialLog in
Avatar of bostonroxx
bostonroxx

asked on

SQL DISTINCT ON TEXT FIELD CAUSES ERROR

I have a query that is returning dups.  I tried using DISTINCT but it wont allow it because I do a select * and some of the fields are TEXT fields.  How can I work around this?  I have to have those in my query Thanks.
Avatar of arun04
arun04

Use convert function on columns of TEXT type and convert them to VARCHAR, it will truncate some data but it works fine
ASKER CERTIFIED SOLUTION
Avatar of meetyg
meetyg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bostonroxx

ASKER

Should I just change this to Varchar(2000)?
Yes, if 2000 characters is enough, you can convert to varchar(2000)