Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Can somone help me to add the first if statment to the second?
if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) as PERIOD,
if(right(PERIOD,1) = 1, mid(PERIOD,3,2) & '/' & num(mid(PERIOD,3,2)+1, 00) & ' HT', if(match(right(PERIOD,1),'2','3','4','5','6'), mid(PERIOD,3,2) & '/' & num(mid(PERIOD,3,2)+1, 00) & ' VT')) as Termin_Org,
The source are in the following pattern so I have to formate it by the first if-formula before I can use the second. Thats why I want to include it in the second.
LOAD * INLINE [
PERIOD
20091
20092
20101
20102
111
112
121
];
Hi,
it's easy. You have to rewrite every PERIOD in the second statement with the first if-clause.
if
(right(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,1) = 1,
mid(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,3,2) & '/' &
num(mid(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,3,2)+1, 00) & ' HT',
if(match(right(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,1),'2','3','4','5','6'),
mid(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,3,2) & '/' &
num(mid(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,3,2)+1, 00) & ' VT'))
Then you would become the following values:
I have only load in your data and put your expressions in a sum-table.
The first expression is your first if-statement.
The second one is your second if-statement.
And the third one is the combining expression see above.
Hope this is, want you want to see.
Regards vicky
Hi,
it's easy. You have to rewrite every PERIOD in the second statement with the first if-clause.
if
(right(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,1) = 1,
mid(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,3,2) & '/' &
num(mid(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,3,2)+1, 00) & ' HT',
if(match(right(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,1),'2','3','4','5','6'),
mid(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,3,2) & '/' &
num(mid(if(len(PERIOD) =3 AND PERIOD >=111 AND PERIOD <940, '20'&PERIOD, PERIOD) ,3,2)+1, 00) & ' VT'))
Then you would become the following values:
I have only load in your data and put your expressions in a sum-table.
The first expression is your first if-statement.
The second one is your second if-statement.
And the third one is the combining expression see above.
Hope this is, want you want to see.
Regards vicky
ah, so "easy" 😃 Thanks!
Yes sometimes 😃