General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Having Clause Not Working
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only