Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
In the script i have a table which contains the following fields:
CODE_A,
CODE_B
AMOUNT_A_CURRENT_YEAR,
AMOUNT_B_PREVIOUS_YEAR,
TYPE_OF_SALE
FROM INVENTORY;
I want to exploit the two fields :
AMOUNT_A_CURRENT_YEAR,
AMOUNT_B_PREVIOUS_YEAR,
Basically i want to create a Year field based on those two fields using the name.
Basically i want to say:
if AMOUNT_A_CURRENT_YEAR CONTAINS 'CURRENT' THEN year(today()),
if AMOUNT_B_PREVIOUS_YEAR CONTAINS 'PREVIOUS' THEN year(today())-1 as YEAR_FIELD
But the thing is i want to use those conditions on the field TITLES NAME not the data inside those fields.
Anyone knows how to do taht.
Thank you
Anyway you will be creating separate expressions for current and previous year then you know which expression corresponds to current year and which is previous one then why not just giving year(today()) & year(today())-1 to give titles?