Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cool way to eliminate duplicate column values?
Message
From
07/04/2001 09:41:34
 
 
To
06/04/2001 22:42:26
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00493142
Message ID:
00493187
Views:
15
> ...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
Previous
Reply
Map
View

Click here to load this message in the networking platform