Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query help(list recurring records in a DB)
Message
 
 
To
22/04/2010 12:51:07
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01461504
Message ID:
01461528
Views:
35
>>Can you show what exactly did you write? The query as I posted (even if posted from the top of my head) should have worked just fine.
>
>
>
>can you tell me about this inner join thou?
>
>inner join (select FName, count(*) as NumRec from oTest group by FName having count(*) > 1) Dup
>
>
>It takes all the names from Otest and Dup whose count is more than 1?

Yes. If it's easier for you, let's do in 2 steps:

Step 1. Select FName, count(*) as NumRec from OTest group by FName having count(*) > 1 into cursor curDups

Step 2. Select OTest.*, curDups.NumRec from OTest INNER JOIN curDups on OTest.FName = CurDups.FName

In my query from the very first message I just combined these two steps into one query using the technique called derived table technique (available in VFP 9 only).
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform