Search code examples
kdbq-lang

how do i make changes while assigning in q


For example, I know that:

c1 xasc table

Will return a table that is sorted in ascending order by values in c1, but that does not change the table itself. So i wonder if there exist a method other than

table:`c1 xasc table

that can apply the change to the table.


Solution

  • You could do the following, which overwrites the old table with the new sorted version.

    `c1 xasc `table