How do I apply substring function for each entry in a query in KDB/Q?
> s:"hello"
> s[0 1]
> "he"
> # apply this to string column 'col' in following query
> select col from tab
q)show tab:([] col:(0N 5)#15?.Q.a)
col
-------
"mikbj"
"lfuwg"
"byfen"
q)select col[;0 1] from tab
x
----
"mi"
"lf"
"by"
q)select 2#'col from tab
col
----
"mi"
"lf"
"by"
--
You received this message because you are subscribed to a topic in the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/personal-kdbplus/Ogh15SyoPYE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to personal-kdbpl...@googlegroups.com.
To post to this group, send email to personal...@googlegroups.com.
Visit this group at http://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.