Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eliminate duplicates with text field

Status
Not open for further replies.

Kubilus1

IS-IT--Management
Apr 25, 2001
99
US
I have a parameterized stored procedure that I need to eliminate duplicates from. I tried using SELECT DISTINCT, but I get an error saying that the text field cannot be selected as distinct. One of the fields is a text field.
Looked in BOL and it doesn't offer much help

Is there some way to get around this?
Is there another keyword I could use?

(running SQL server7, Sp3 on winNT 4 sp6)

Thanks,
Matt
 
it all depends on you data and table schema up to 8000 characteres you could use SELECT DISTINCT cast(ColName, as varchar(n)) n = 1 to 8000.
AL Almeida
NT/DB Admin
"May all those that come behind us, find us faithfull"
 
Thank you, thats exactly what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top