Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate records
Message
From
19/07/2005 11:45:03
 
 
To
19/07/2005 00:43:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01033719
Message ID:
01033886
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
>Hi friends
>i need ur advise on this query.I've 2 fields in a table (patient,invoice).
>field invoice contains invoice no for a patient.this no can be duplicated for the same patient but not for the different patient.
>i mean we can have data like this
>
>patient invoice
>pk patient invoice
>1 John I001
>2 John I001
>3 Paul I002
>
>but there should not be like following
>pk patient invoice
>A1 John I001
>A2 John I001
>A3 Paul I001 --its wrong
>A4 Paul I002
>
>my question is how can i find out such duplicates ?
>Thanks


It's two steps but how about.........
SELECT DISTINCT invoice,patient FROM myTable INTO CURSOR curTmp
SELECT invoice FROM curTmp GROUP BY 1 HAVING COUNT(*) > 1
Previous
Reply
Map
View

Click here to load this message in the networking platform