(the FROM is not actual, changed for privacy issues). I have a simple query where I want to bring back all data starting on varStartDate and if possible, end varEndDate.
Hi @ebarr , try putting the flow variable inside single quotes,
i.e.
WHERE "date" >= '$${SvarStartDate}$$'
The DB nodes perform direct string replacement of flow variables so you still need to put in any single quotes to make the statement syntactically (and semantically) correct. At the moment, when the string replacement of the flow variable occurs, your sql statement will become this:
WHERE "date" >= 2024-01-01
On many databases this would generate an error, because it is actually comparing a date with an integer (2022) … the result of 2024 minus 1 minus 1
I can only presume that Amazon Redshift is happy to compare dates with integers.
By adding the single quotes, it will become this:
WHERE "date" >= '2024-01-01'
which should then give the result you are expecting.