Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cool way to eliminate duplicate column values?
Message
De
07/04/2001 09:41:34
 
 
À
06/04/2001 22:42:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00493142
Message ID:
00493187
Vues:
14
> ...SELECT DISTINCT yourtable.yourfield FROM yourtable INTO yourwhatever should give you just the unique vales for the field in question, no? Do you also need the entire row?

Yeah, basically. I had already figured out how to eliminate the duplicates to generate a unique key. I was hoping I could use that somehow to produce entire rows.

Specifically, I've got unique part numbers and I want to build a table of the initiating work order for each part (the one-to-many relationship is from part number to work order number).

I can write a little scan loop that could build such a table from the key built by the SELECT DISTINCT you suggest above....I was just wondering if there was a way to do what I want with just SELECTS...I've played around a little with JOINS, but to no avail..no matter what type of JOIN I use, I keep getting a result set that is the size of the work order table.
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform