Search code examples
kdb

How do I remove quotation mark in columns in KDB


I have a table t which contains a column called CMYN. But every cell in that column is enclosed by quotation marks. How can I update that column to get rid of the double quotation marks?

e.g. I want to change the column value from "APPLE" to APPLE

Thank you in advance!


Solution

  • It sounds like casting the column to symbol type is what you're after. See below.

    q)table:([]sym:5#enlist"APPLE")
    q)update`$sym from table
    sym
    -----
    APPLE
    APPLE
    APPLE
    APPLE
    APPLE