KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Iterators with tables Re: Iterators with tables

  • cillianreilly

    Member
    October 12, 2023 at 12:00 am

    Assuming the sym column in your original table is distinct:

    q)update upperTime:1 from t where any each price<=level 
    sym price level lowerTime upperTime 
    ------------------------------------------ 
    abc 10 20.3 13.5 15 1 
    cde 11 21.3 13.5 16 1