KDB:如何编写 select 语句,其中 table 包含多个值 space 分隔
KDB :How to write select statement where table contains multi values space separated
我必须查询 table 以获取包含 Class 1,Class 2,Class 3,Class 4
的列的值,在 KDB 上使用 select 查询。
我能够获取单个值但不能获取多个值。
我尝试了以下方式:
http://iapp123.qa.abc.com:2345/?select from classDetails where standard in
`$("Class 1")
此处 classDetails
是 table 名称,standard
是列名称。
但不知道如何在查询条件中使用多个值来使用它,即同时添加 Class 2,Class 3,Class 4
和
由于您将 "Class 1" 转换为符号,我认为可以安全地假设 standard
列的类型也是符号。在这种情况下
select from classDetails where standard in `$("Class 1"; "Class 2"; "Class 3")
会为所欲为。
使用 like
:
select from classDetails where standard like "Class [1-3]"
我必须查询 table 以获取包含 Class 1,Class 2,Class 3,Class 4
的列的值,在 KDB 上使用 select 查询。
我能够获取单个值但不能获取多个值。
我尝试了以下方式:
http://iapp123.qa.abc.com:2345/?select from classDetails where standard in
`$("Class 1")
此处 classDetails
是 table 名称,standard
是列名称。
但不知道如何在查询条件中使用多个值来使用它,即同时添加 Class 2,Class 3,Class 4
和
由于您将 "Class 1" 转换为符号,我认为可以安全地假设 standard
列的类型也是符号。在这种情况下
select from classDetails where standard in `$("Class 1"; "Class 2"; "Class 3")
会为所欲为。
使用 like
:
select from classDetails where standard like "Class [1-3]"