Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can a local view be created using code?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00067264
Message ID:
00067266
Vues:
19
>I need to create a form that displays a list of records that are possible duplicates and give the user an opportunity to delete or change the records. The following SQL statements produces the recordset I'm looking for, but I'm having trouble presenting this to the user so the data can be edited. I created a form with a grid but I can't figure out how to have the grid display these records. Can I crate a local view through code for this?
>
>SELECT * FROM helthins WHERE helthins.ssno IN (SELECT ssno;
>FROM helthins;
>GROUP BY dedtype, ssno, sortkey;
>HAVING COUNT(*)>1);
>ORDER BY ssno;
>INTO CURSOR helthins_dupes

When you use GROUP you squeeze source records to one for each group, therefore IMO it's more reliable, at least, to provide programmatic link between cursor and source table, i.e. anytime a user delete a record, you find all records with the same dedtype+ssno+sortkey in source table and delete them programmatically.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform