Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Having Clause Not Working
Message
From
14/04/2007 09:16:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Having Clause Not Working
Miscellaneous
Thread ID:
01215919
Message ID:
01215919
Views:
56
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
Map
View

Click here to load this message in the networking platform