Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

No duplicate list

Discussion in 'Information Technology' started by pechoi@syr.edu, Jul 28, 2006.

Tags:
  1. pechoi@syr.edu

    pechoi@syr.edu
    Expand Collapse
    Guest

    Hi,
    I am trying to display Name from a table to a list object. How do I get
    rid of duplicate names?
    My sql is currentlty looks like:
    SELECT Player.ID, Player.Name FROM Player ORDER BY [Name];
    I tried to deleted ID but no name has been displayed (kind of different
    question).

    Please help
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Duplicate passports offered by GOI to Indians residing in Italy Breaking News Sep 19, 2009
    Sikh News Case of the duplicate signatures (San Jose Mercury News) Breaking News Apr 4, 2005
    Sikh News How The Left & Indian Nationalists Distorted The History Of Sikh Gadhar Movement - Breaking News Sep 21, 2016
    Interfaith Materialists And Its Discontents Interfaith Dialogues Jun 10, 2016
    Sikhi Quasi-Pragmatists And Quasi-Spiritualists, Care To Explain? Sikh Sikhi Sikhism Jun 6, 2016

  3. Evan Camilleri

    Evan Camilleri
    Expand Collapse
    Guest

    SELECT Player.Name
    FROM Player
    GROUP BY Player.Name
    ORDER BY Player.Name;

    Evan



    <pechoi@syr.edu> wrote in message
    news:1152029111.058826.136060@a14g2000cwb.googlegroups.com...
    > Hi,
    > I am trying to display Name from a table to a list object. How do I get
    > rid of duplicate names?
    > My sql is currentlty looks like:
    > SELECT Player.ID, Player.Name FROM Player ORDER BY [Name];
    > I tried to deleted ID but no name has been displayed (kind of different
    > question).
    >
    > Please help
    >
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On 4 Jul 2006 09:05:11 -0700, pechoi@syr.edu wrote:

    >Hi,
    >I am trying to display Name from a table to a list object. How do I get
    >rid of duplicate names?
    >My sql is currentlty looks like:
    >SELECT Player.ID, Player.Name FROM Player ORDER BY [Name];


    SELECT DISTINCT Player.ID, Player.[Name] FROM Player ORDER BY [Name];

    will return one record for each distinct combination of ID and Name.
    If you have ten records with different ID's but all with the same
    Name, you'll still see ten records. I'm not sure what you want to do
    in this case - might you not someday have two players, different
    people, who just happen to have the same name?

    >I tried to deleted ID but no name has been displayed (kind of different
    >question).


    I presume you're displaying these in a Listbox or a Combo Box? If so,
    check that control's ColumnCount and ColumnWidths property. It's very
    typical to have two columns in the rowsource query, and to set the
    ColumnWidths to (say) 0;1.5 in order to conceal the meaningless ID
    number while displaying the name.

    I'm worried that your Player table is incorrectly filled: do you have
    multiple records in the table for each player? How is this combo being
    used?

    John W. Vinson[MVP]
     

Share This Page