Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL question
Message
From
01/08/2012 13:30:50
 
 
To
01/08/2012 12:17:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01549669
Message ID:
01549693
Views:
63
>I want to remove duplicate VFP Memo records using SQL.
>
>Any ideas on how this is accomplished?
>
>*Can the code below be modified to remove duplicates in a memo field?
>
>USE URLS
>* Using SQL to remove dupicates (Thanks Naomi)
>SET ENGINEBEHAVIOR 90
>SELECT * FROM URLS GROUP BY Location INTO TABLE URLtemp
>SET SAFETY OFF
>CLOSE TABLES ALL
>COPY FILE URLtemp.DBF TO URLS.DBF
>CLOSE TABLES ALL

If this is a VFP table then you will get "SQL: GROUP BY clause is missing or invalid' with ENGINEBEHAVIOR = 90

With ENGINEBEHAVIOR 70 you would get a unique list of locations but the values for the other fields are unpredictable (I'm pretty sure they come from the last physical record in the table for each location - but I'm not 100% on that and, anyway, that's not something you really want to bank on).

If you provide a table structure and some sample records and the desired result, I'm sure that you'll get several responses on how to get what you need.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform