Is it possible to use the SQL IN operator with view()?
SELECT * WHERE column_val IN ('str1','str2','str3')
Ideally I'd like to pass this as an argument:
SELECT * WHERE column_val IN args[0]
args[0] = "('str1',str2','str3')"
Is it possible to use the SQL IN operator with view()?
SELECT * WHERE column_val IN ('str1','str2','str3')
Ideally I'd like to pass this as an argument:
SELECT * WHERE column_val IN args[0]
args[0] = "('str1',str2','str3')"
Figured it out, 'in' cannot be capitalized:
view(
SELECT * WHERE column_val in args[0],
{dataset_tag},
("'str1','str2'")
)
The reason it cannot be capitalized is that it is not the SQL "IN" operator, but the python "in" operator. Expressions in my PseudoSQL are python. Particularly important for "equals" comparisons.
Thanks for clarifying, I've found the module is incredibly useful for reducing the number of large polling queries made against a database that just requires small filter differences.
I'd like to make my 'in' list a variable that I build.
I can get this to work:
view('SELECT ORDER_NO WHERE SHORTAGE == "False" and HAS_OPEN_NCR == 0 and ACTIVE in (1,3,7,8) and DEST_STATION in args[0]', {[~]ZeelandData/Kanban/KanbanWOData} ,"(181, 441)" )
'
This is a string, not a list. Cannot work, for the same reason you cannot do it with real JDBC and ?
substitution.
Consider using the nestable iterators in V2, now called my Integration Toolkit.