Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
is it possible to use set - expressions to query for null values?
For example, I would like to express the following formula:
sum ( if (isnull(OrderNumber), Flag)
Thanks,
Gerald
Hello,
I think you need to calculate sum of all flag minus flags with orders :
sum({1-<OrderNumber>=0>} Flag)
or sum(Flag) -sum({<OrderNumber>=0>} Flag)
It returns 3 (10-7) with this script :
test:
load
recno() as Key,
if (mod(recno(),3)=0,null(),recno()) as OrderNumber,
1 as Flag
autogenerate(10);
I believe it's as simple as this:
sum({<OrderNumber={}>} Flag)
That should give you the set of all selected records that are not associated with OrderNumber, which I think is the same as saying you want all selected records where the OrderNumber is null.
Hello,
I think you need to calculate sum of all flag minus flags with orders :
sum({1-<OrderNumber>=0>} Flag)
or sum(Flag) -sum({<OrderNumber>=0>} Flag)
It returns 3 (10-7) with this script :
test:
load
recno() as Key,
if (mod(recno(),3)=0,null(),recno()) as OrderNumber,
1 as Flag
autogenerate(10);
Thanks