KX Community

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

Home Forums kdb+ Generating unique symbol list does not consider symbols after `p Re: Generating unique symbol list does not consider symbols after `p

  • mauricelim

    Member
    April 18, 2022 at 12:00 am

    The range of generate for symbols is only from abcdefghijklmnop as documented here: https://code.kx.com/q/ref/deal/#roll-and-deal

    As to why is that so, I have no idea as well.

    But you can use something like this to solve your problem:

    q){[num;len] neg[num]?`${.Q.a cross x}/[len-1;enlist each .Q.a]}[17;1] `e`n`d`g`r`y`b`p`j`l`s`i`f`k`w`u`c 
    q)asc{[num;len] neg[num]?`${.Q.a cross x}/[len-1;enlist each .Q.a]}[256;2] `s#`af`an`aq`as`ax`ay`ba`bd`be`bj`bk`bl`bn`bo`bu`bw`ca`cb`cc`cd`cf`cn`co`cq`c..