cancel
Showing results for 
Search instead for 
Did you mean: 

non null aj

naveen_sharma
New Contributor
Is there any easy way to get aj to give me the last non null value of all the columns in the second table.

E.g aj[`time; tbl1; tbl2]

To clarify: the table to be joined (tbl2) has several columns with nulls at different points in the different columns.
For each row in the first table (tbl1), I want to get the last non null value of each column in the second table (tbl2).
3 REPLIES 3

wp
New Contributor
this is not the purpose of aj.you could use fills, as inaj[`sym`time;t;update fills c1,fills c2,... by sym from q]this would still return nulls on t's rows where q.time>t.time by sym ...On Mon, Dec 23, 2013 at 6:25 AM, naveen sharma wrote:> Is there any easy way to get aj to give me the last non null value of all> the columns in the second table.>> E.g aj[`time; tbl1; tbl2]>> To clarify: the table to be joined (tbl2) has several columns with nulls at> different points in the different columns.> For each row in the first table (tbl1), I want to get the last non null> value of each column in the second table (tbl2).>> --> You received this message because you are subscribed to the Google Groups> "Kdb+ Personal Developers" group.> To unsubscribe from this group and stop receiving emails from it, send an> email to personal-kdbplus+unsubscribe@googlegroups.com.> To post to this group, send email to personal-kdbplus@googlegroups.com.> Visit this group at http://groups.google.com/group/personal-kdbplus.> For more options, visit https://groups.google.com/groups/opt_out.

wp
New Contributor

>where q.time>t.time by sym
i meant, where there is no q.time<=t.time by sym

thanks!