Wed Aug 15, 2018 4:33 pm
Login Register Lost Password? Contact Us

Working with NULLs

Forum for KEL development, users and support

Tue Jan 28, 2014 7:27 pm Change Time Zone

For hardened ECL programmers one of the major new (and probably odd) features of KEL is that it supports NULLs. This is knowledge engineering; you need to know if you know something?

As a simple example

Code: Select all
,STRING fname
,STRING mname
,STRING lname
USE header .  file_headers(FLAT,ePerson);

ePerson: dob > 0 => Age := 2014-dob DIV 10000;

QUERY:  zipstats <= ePerson{zip,Age$GROUP:Ave,Age$GROUP:Median};

Look at the computation of Age, especially the precondition .... It can be read as:

For all ePerson, if dob > 0 then the Age is defined as ....

Then when we come to compute the average age and the median; will will ONLY be dealing with those ages that are actually defined ....
Community Advisory Board Member
Community Advisory Board Member
Posts: 109
Joined: Fri Apr 29, 2011 1:35 pm

Return to KEL

Who is online

Users browsing this forum: No registered users and 1 guest