Why doesn’t ‘select from tablename where name = `ABC/A’ work?

When using symbols that have special characters embedded in them, you need to use a string and cast it to a symbol.

In the example in the question, the / is interpreted as the q adverb over:

q)`ABC/A / interpreted as `ABC over A.
‘/

The ‘/ error means we have misapplied /. Here’s how to create the symbol we want:

q)`$ “ABC/A”
`ABC/A
q)select from tablename where name = `$ “ABC/A”

Finally, symbols with embedded spaces are allowed, as long they are not leading or trailing:

q)`$” ABC E “
`ABC E
q)string `$” ABC E “
“ABC E”
q)


This work is licensed under a Creative Commons License.
The views and opinions expressed herein are those of the authors and do not necessarily reflect those of any other person or legal entity.
Kdb+ is the registered trademark of Kx Systems, Inc.