...

View Full Version : Text/Image datatype cannot be selected as DISTINCT



SYMBIO
02-26-2003, 11:43 AM
Damn, what does that mean dude?

this my query>

select distinct na.ARTICLE_ID, na.ART_AUTHOR, na.ART_TITLE, na.ART_CONTENT, na.ART_STARTDATE, na.ART_ENDDATE, na.ART_PHOTO, na.ART_SUBMITTED, nu.USER_USERNAME from news_article AS na inner join news_user AS nu on nu.user_id=na.art_author inner join news_artcats AS nc on nc.artcat_art=na.article_id inner join news_category AS nwc on nwc.category_id=nc.artcat_cat where nu.user_id=na.art_author and nu.USER_USERNAME='satpal'

raf
02-26-2003, 01:59 PM
what it says.

what database do you use ?

SYMBIO
02-26-2003, 02:01 PM
MS SQL server

so i cant use a simple distinct on sql server?

raf
02-26-2003, 02:13 PM
never used ms sql server.
but in access, you can use it. Though maybe not on immae variables (like the photo in your query)

also, when using a join, i always go for distinctrow in stead of distinct. (Each combination of values must then be unique)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum