Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query for recurring entries
Message
De
27/04/2010 13:40:26
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Query for recurring entries
Divers
Thread ID:
01462240
Message ID:
01462240
Vues:
111
Hello All
so i messed up a table i had an records i enter even thou its the same can hav different client ids

so i wrote this query
SELECT COUNT(otest.fname) AS numrec,otest.fname,;
    otest.prefix,otest.bday,otest.aoonumber,;
   otest.id;
     FROM MAINBASE!OTEST;
GROUP BY otest.fname;
HAVING (numrec) >(1);
INTO TABLE dup
so that works fine it opens a dup table an i see like
Numrec   fname
2                   peter
3                   james
select otest.id,otest.fname,dup.fbobname,dup.clientid,dup.numrec
from;
mainbase!otest;,count(*) as numrec FROM otest GROUP BY fname HAVING COUNT(*)>1);
dup ON otest.fname=dup.fname
Inner join (select fname 
>
>but im trying to link the otest table an the dup table in such a way that instead of showing one row for Peter an moving to JAmes it will show me the two rows for peter and the three for james so i can do what i need to do with them.

So i have so far
select otest.id,otest.fname,dup.fbobname,dup.clientid,dup.numrec
from;
mainbase!otest;,count(*) as numrec FROM otest GROUP BY fname HAVING COUNT(*)>1);
dup ON otest.fname=dup.fname
Inner join (select fname 
but it doesnt work :(
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform