Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning,
i would like to change a value in a data when i'm importing them.
For example:
load * inline [
CLASS, VALUE,
A, 100,
B, 200,
C,209,
C,-120];
Ii would like to have --> when CLASS=C and value>0 give me NEW CLASS D,
when CLASS=C and value<0 give me NEW CLASS E
and drop the C class
how can i do it?
LOAD
if(A='22720010' and B<0,'DDD',IF(A='22720010' and B>0, 'CC',A)) AS CLASS,
[A] AS CLASS,
[B] AS VALUE,
[C] AS YEAR
FROM excel
two field same name !
maye be :
if(A='22720010' and B<0,'DDD',IF(A='22720010' and B>0, 'CC',A)) AS CLASS,
[B] AS VALUE,
[C] AS YEAR
from ...
Like ?
Data:
load if(CLASS='C' and VALUE>0,'D',if(CLASS='C' and VALUE<=0,'E',CLASS)) as CLASS, VALUE inline [
CLASS, VALUE
A, 100
B, 200
C,209
C,-120];
output :
LOAD
if(A='22720010' and B<0,'DDD',IF(A='22720010' and B>0, 'CC',A)) AS CLASS,
[A] AS CLASS,
[B] AS VALUE,
[C] AS YEAR
FROM excel
What's wrong?
LOAD
if(A='22720010' and B<0,'DDD',IF(A='22720010' and B>0, 'CC',A)) AS CLASS,
[A] AS CLASS,
[B] AS VALUE,
[C] AS YEAR
FROM excel
two field same name !
maye be :
if(A='22720010' and B<0,'DDD',IF(A='22720010' and B>0, 'CC',A)) AS CLASS,
[B] AS VALUE,
[C] AS YEAR
from ...
Thank you!! Great help!