Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a table like this
Country | YearMonth | Value |
---|---|---|
ARG | 201601 | 1 |
BOL | 201602 | 2 |
PER | 201603 |
I need a flag when value doesnt exist
i tried something like this
TemporalTC:
LOAD Country,
YearMonth ,
Value,
1 AS FLAG_HAY_TC
FROM
[..\number.xlsx]
(ooxml, embedded labels, table is Hoja1);
TC:
noconcatenate
Country
Value,
YearMonth,
IF(isnull(FLAG_HAY_TC),'1','0') AS FLAG_NO_TC
RESIDENT TemporalTC;
I tried also with if flag = 1 but it doesn't work
can you help me? maybe there is an example?
thank you
May be try this:
TemporalTC:
LOAD Country,
YearMonth ,
Value,
If(Len(Trim(Value)) > 0, 1, 0) as FLAG_HAY_TC
FROM
[..\number.xlsx]
(ooxml, embedded labels, table is Hoja1);
May be try this:
TemporalTC:
LOAD Country,
YearMonth ,
Value,
If(Len(Trim(Value)) > 0, 1, 0) as FLAG_HAY_TC
FROM
[..\number.xlsx]
(ooxml, embedded labels, table is Hoja1);