Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Having Clause Not Working
Message
De
14/04/2007 09:16:50
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Having Clause Not Working
Divers
Thread ID:
01215919
Message ID:
01215919
Vues:
57
I have the following select:

SELECT c_Masters.iMasterStmt,COUNT(*) as icnt ;
FROM c_Masters ;
GROUP BY 1 ;
HAVING iCnt>1 ;
INTO CURSOR c_PartialClosedMastersTemp

The having clause is not filtering. Here are the first few lines of my results:

Imasterstmt Icnt
133088 1
133090 1
133093 1
133095 1
133096 1
133097 1
133101 1
133103 1
133105 1

I've seen this before. Am I doing something wrong, or is this a bug?

FYI - c_Masters is also a cursor, based on the following SQL:

SELECT stmts.iMasterStmt,stmts.lClosed,COUNT(*) as icnt ;
FROM stmts ;
WHERE stmts.iMasterStmt # 0 ;
GROUP BY 1,2 ;
INTO CURSOR c_Masters readwrite

STMTS is a VFP table.

Thanks

David
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform