OK If you are going to do this, why not go all the way

C_LonGINT($RECORDSINTABLE;$ALLRECORDS;$NOTAPPROVED;$APPROVED)
$RECORDSINTABLE:=RECORDS IN TABLE([Approvals])
> ALL RECORDS([Approvals])
> ALLRECORDS:= Records in selection([Approvals])
SET QUERY DESTINATION(INTO VARIABLE;$NOTAPPROVED)
QUERY([Approvals];[Approvals]APPROVED=FALSE)
SET QUERY DESTINATION(INTO VARIABLE;$APPROVED)
QUERY([Approvals];[Approvals]APPROVED=TRUE)
Now compare results
also if boolean is indexed, I might drop and then read that index, before 
running queries
regards
 chuck
------------------------------------------------------------------------------------------------
 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064       
 mailto:cjmiller<AT SIGN>informed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer                
       Providers of 4D and Sybase connectivity
          http://www.informed-solutions.com  
------------------------------------------------------------------------------------------------
This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

> On Jul 3, 2018, at 3:12 PM, Jeremy French via 4D_Tech <[email protected]> 
> wrote:
> 
> ALL RECORDS([Approvals])
> $count_all := Records in selection([Approvals])
> 
> QUERY([Approvals];[Approvals]approved=False)
> $count_query := Records in selection([Approvals])
> 
> Are the two counts equal?

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to