I'm using Talend Open Studio for Data Integration.
I have tables that are generated every day and table names are suffixed by date like so
I have two-part question. I want to look at the table which has yesterday's date in it so sysdate - 1 and I want to fetch data from yesterday
select 'dailystats' ||to_char(sysdate - 1,'YYYYMMDD') TableName
from dual;
I've worked with static table names and its a straightforward process.
"select [fields] from dailystats"+ TalendDate.formatDate("yyyyMMdd", TalendDate.addDate(TalendDate.getCurrentDate(), -1, "dd"))