kdb+k

How to convert a symbol to a string in kdb+?


For example, if I have a list of symbols i.e (`A.ABC;`B.DEF;`C.GHI) or (`A;`B;`C), how could I convert each item in the list to a string?


Solution

  • Thanks all, useful answers! While I was trying to solve this on my own in parallel, I came across ($) that appears to work as well.

    q)example:(`A;`B;`C)
    q)updatedExample:($)example;
    q)updatedExample
    enlist "A"
    enlist "B"
    enlist "C"