Hi,
i have a table with 10 columns ,with names: cost201907, cost201906, cost201905 ......
i want to put in a variable the today month and year: a = 201907
My goal is to select a column using this variable.
for example i want its month to run a script which give me today date in a variable, for example: a = 201907
and after use it to select the most recent columns with a select statement, such as: Select 'cost'||a from Table1.
Probably i ll use PL/SQL but still cant find a way. Please help me.