Results 1 to 3 of 3

Thread: DISTINCT question

  1. #1
    Join Date
    Jun 2003
    Location
    NJ
    Posts
    8

    DISTINCT question

    Hi everyone!

    I have what I'm sure is a simple question. In a table, (ms sql), I have a numeric field called ID, then many text fields like LastNAme, FirstName, Address, etc. The ID isn't an autoincrement, it's assigned to each person whose info is being collected. I want to make a view where the ID numbers are Distinct, and the rest of the user's information comes with it. BUt I get an error message saying something like I can't do a distinct sort on those fields because they're text.

    If anyone has any insight on how to pull this off, I'd greatly approciate it!
    Thanks!

  2. #2
    Join Date
    Mar 2003
    Posts
    468
    please post your current sql that you are using and the error message along with it.

  3. #3
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    If the data type is text you can't do it. Change the data type to varchar, if this is not possible use substring function in your query for all text columns.

Posting Permissions

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