Hello Vajindar,
So when you are casting you are expecting this table to insert atoms and not lists. To avoid this you can set it as an empty table and then insert upon this like so; this will cast the column to the datatype inserted:
q)dt:([dn:()] dname:(); location:())
q)
q)`dt insert (1 2 3i;“CDE”;“GHJ”)
0 1 2
q)dt
dn| dname location
–| --------------
1 | C G
2 | D H
3 | E J
q)meta dt
c | t f a
--------| -----
dn | i
dname | c
location| c
May I suggest you use symbols instead of characters as it is much easier to add multiple elements to your table, these can then be casted to strings separately if needed I believe.