I have multiple Teradata queries. Each query declares a beginning date and end date:
DECLARE @DATE1 DATE = '2020-01-01';
DECLARE @DATE2 DATE = '2020-02-01';
I am using RStudio to run all the queries and joins, but I have to change the dates manually in each Teradata script. I saw something where I can use $(variable) that will call the variable from R into Teradata, but I get a syntax error.
Is there a way to declare my dates in R studio and pass DATE1 and DATE2 into the Teradata queries?