Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL - Removing duplicates
Message
 
 
To
05/09/2001 08:45:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00552436
Message ID:
00552438
Views:
16
>I have table with 5 or so fields and I am trying to eliminate records where there are duplicates based on the field UPIN. The whole record isn't duplicated but the UPIN value is. So the name,UPIN,credential would/could be duplicated but the zip,state, and specialty might be different. I need only unique (DISTINCT) records based on the UPIN field but I need the whole record.
>Hope this isn't clear as mud.
>Thanks,
>Eric

The following code will select one record per UPIN with data comming from the last record for each duplicate UPIN
SELECT * ;
  FROM mytable ;
  GROUP BY UPIN ;
  INTO CURSOR mycursor
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform