Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have 3 tables like below.
Table 1 : FieldA FieldB FieldC
Table 2: FieldA FieldB FieldD
Table3: FieldA FieldB FieldE
And I would like to make this NewTable.
NewTable: FieldA FieldB FieldC FieldD FieldE
Could somebody show me what is the best way to make it work.
Thanks in advance.
Jay
Hi Jay,
This should do it I guess unless I'm missing something:
NewTable:
Load
FieldA,
FieldB,
FieldC
From xxxx;
join
Load
FieldA,
FieldB,
FieldD
From zzzz;
join
Load
FieldA,
FieldB,
FieldE
From yyyy;
Jay,
depending on your needs, you can either join the tables, as suggested above (possibly using left join if needed), or you may want to concatenate the tables. When you concatenate, no key matching is done, and the data is simply appended - very much like "UNION ALL" in SQL, only in QlikVIew you can force concatenation even with slightly different sets of fields.
cheers,
Hi Johannes,
Thanks for you prompt reply.
By the way, it seems that I cannot use "load from" since it tries to load data from file but what I need is to do it from existing file.
Thanks any way.
Oleg,
Thanks. By the way, My tables are created by Crosstable function and have exactly same row numbers.
Any idea?
Table1:
CrossTable(FieldA, FieldC, 1)
LOAD
@3 as FieldB,
@11 as 1,
@13 as 2,
@15 as 3
FROM [$(psFile)]
(biff, no labels, header is 2 lines, table is ??????$);
Table2:
CrossTable(FieldA, FieldD, 1)
LOAD
@3 as FieldB,
@12 as 1,
@14 as 2,
@16 as 3
FROM [$(psFile)]
(biff, no labels, header is 2 lines, table is ??????$);
Table3:
CrossTable(FieldA, FieldE, 1)
LOAD
@3 as FieldB,
@35 as 1,
@36 as 2,
@37 as 3
FROM [$(psFile)]
(biff, no labels, header is 2 lines, table is ??????$);