sql - Negate a bind variable -


i using apex 5.0 , have query such as:

select * table condition = :bind_variable 

i have list dynamically fills in bind variable. list has 2 values bind variable can take:

value 1 except value 1 

'everything else' value returned user controlled can't have exists or in because not know values in there.

is possible like

select * table condition = !'value 1'

i don't remember exact syntax oracle substring, can try like:

select * table (condition = :bind_variable , substr(:bind_variable, 1, 1) <> '!') or (condition <> substr(:bind_variable, 2) , substr(:bind_variable, 1, 1) = '!') 

so, if value starts ! symbol - except passed value


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -