Forum Discussion
Distinctcount on two filter values
Thanks Tamerj1 for your suggestion,
In this case
ISEMPTY('Table') is more efficient than COUNTROWS because it just requires one attempted read for A and one for B.
Whereas COUNTROWS will have to scan all the records for the context.
Thanks.
Counting the rows of a table of maximum two rows in not significant
- speedramps3 years agoSuper User
Thanks Tamerj1
I dont mind other Super Super offering a better solution but ISEMPTY is the the best practice for cheching if a scenario does or does not exist.
Please dont assume there is just one record per enterprise and teach newbees to use COUNTROWS.
The clue is the command names !
ISEMPTY is a boolean checks if the table expression is empty
where as COUNTROWS is computative.
Please use ISEMPTY for checking and COUNTROWS for computations.
No, if, buts or any excuses ... ISEMPTY is the better solution. OK? 😀😀😀