Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2002
    Location
    London England.
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Text/Image datatype cannot be selected as DISTINCT

    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'
    Thanks so much for you help,
    Satpal.

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what it says.

    what database do you use ?

  • #3
    New Coder
    Join Date
    Oct 2002
    Location
    London England.
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    MS SQL server

    so i cant use a simple distinct on sql server?
    Thanks so much for you help,
    Satpal.

  • #4
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •