My strong conviction is that no solution for this exists, but I thought I'd ask anyways. My question is precisely this one:
Are there any way to execute a query inside the string value (like eval) in PostgreSQL?
But for Amazon Redshift, which does not support stored functions. Specifically, I believe my expressions can all be evaluated as Booleans with one or more expressions such as 'X <= 10' concatenated with ANDs and ORs, i.e.:
string = 'X <= 10 AND Y = 5 AND Z >= 0'
I can easily replace into the variables with the correct values but am trying not to resort to building my own parser. Anyone see a nice way to do this? Thanks!