Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Gerrit Broekhuis
  Where is Gerrit Broekhuis?
 Holten
 Netherlands
 Gerrit Broekhuis
 Tags
Subject: Prevent duplicate entries
Thread ID: 462283 Message ID: 462283 # Views: 38 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Thursday, December 6, 2018 5:01:49 PM         
   


Hi,

In one of my programs I use this code do prevent duplicate entries for the field "email" for a mailinglist:

SET ENGINEBEHAVIOR 70
SELECT TMP.company,TMP.address,TMP.email FROM TMP GROUP BY email INTO CURSOR TEMP_EMAIL READWRITE
SET ENGINEBEHAVIOR 90


This works OK, but I don't like the idea of using ENGINEBEHAVIOR 70 (never did before). Without ENGINEBEHAVIOR 70 I get error 1807 "SQL: GROUP BY clause is missing or invalid".

This cursor has no PK, only the fields mentioned above. What should I change do get the same result with ENGINEBEHAVIOR 90?

Regards, Gerrit

Today is only yesterday's tommorrow - Uriah Heep

ENTIRE THREAD

Prevent duplicate entries Posted by Gerrit Broekhuis @ 12/6/2018 5:01:49 PM
RE: Prevent duplicate entries Posted by Eric den Doop @ 12/6/2018 5:14:59 PM
RE: Prevent duplicate entries Posted by Gerrit Broekhuis @ 12/6/2018 5:28:27 PM
RE: Prevent duplicate entries Posted by Koen Piller @ 12/6/2018 5:15:11 PM
RE: Prevent duplicate entries Posted by Gerrit Broekhuis @ 12/6/2018 5:25:27 PM
RE: Prevent duplicate entries Posted by Borislav Borissov @ 12/6/2018 5:27:42 PM
RE: Prevent duplicate entries Posted by Gerrit Broekhuis @ 12/6/2018 5:32:57 PM