Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Qlik! I'm tryng to add a column to an existing table, but after loading it its creating a new entirery table. I have something like this:
table_1:
select *
from source
table_2:
left join table_1
load *
select *
from source2
here, one of the joined columns of table_2 is comming almost entirely null into table_1, and im trying to fix this as:
table_1:
load
*,
if(isnull(column_a), 1, column_a) as column_a_2
resident table_1
but here, instead of adding the new column to table_1, is creating a new table 'table_1-3' (no idea why its add a 3 instead of a 2, i guess) with all the columns on table_1, plus the addicional column and a synthetic key joining table_1 with table_1-3 on all the * columns.
Thanks for any help.
A Load statement will create a new table. The name "table_1-3" is being assigned because the name assigned in your label "table_1:" is already in use.
You should create a table with a different name and DROP the original table_1.
table_1_new:
load
*,
if(isnull(column_a), 1, column_a) as column_a_2
resident table_1;
DROP Table table_1;
-Rob
A Load statement will create a new table. The name "table_1-3" is being assigned because the name assigned in your label "table_1:" is already in use.
You should create a table with a different name and DROP the original table_1.
table_1_new:
load
*,
if(isnull(column_a), 1, column_a) as column_a_2
resident table_1;
DROP Table table_1;
-Rob
Thank you, I had to rewrite the code before to keep the original name at the end, but it worked as I needed it.