Hi @all,
didn't found anything on the internet, but is it possible to load two tables with the same structure as two single tables? QlikView is automatically merging same column names, which is normally fine, but for my specific problem I need them to be loaded seperately.
Anyone can help me?
Thanks for any help!
Hi
Use NOCONCATENATE before your load statement.
Hi,
that unfortunately doesn't work for me. It still merges same column names. This is, what I wrote:
NoConcatenate Load *
From '.\Data\Awareness.xlsx'
(ooxml, embedded labels, Table is [Table1]);
NoConcatenate Load *
From '.\Data\Awareness.xlsx'
(ooxml, embedded labels, Table is [Table2]);
NoConcatenate Load *
From '.\Data\Awareness.xlsx'
(ooxml, embedded labels, Table is [Table3]);
Maybe there's something wrong about the script?
Hi,
Be careful of synthetic keys too as if the two tables have the same field names then QlikView will try to join the tables on ALL of the fields. Two ways of fixing this are to rename the fields in one table or to use QUALIFY keyword (look it up in the help file for a description of what it does) to prefix the fields in your tables with the table name.
Another suggestion though, although I don't know the reason for you loading it into two tables instead of one, is just to load the two tables into one table as QlikView is doing and specifying a field to say which table it originally came from.
Chris
Hi,
Possibly it is that there are no table names? E.g.
Table1:
NoConcatenate Load *
From '.\Data\Awareness.xlsx'
(ooxml, embedded labels, Table is [Table1]);
Table2:
NoConcatenate Load *
From '.\Data\Awareness.xlsx'
(ooxml, embedded labels, Table is [Table2]);
Table3:
NoConcatenate Load *
From '.\Data\Awareness.xlsx'
(ooxml, embedded labels, Table is [Table3]);
Hi,
the qualify keyword is a good idea! Maybe I'll give that a try.
The way with table names in the load script unfortunately didn't work either.
The problem why I can't put them in a single table is, because for the same column and the same date there are different values for different categories. Hard to explain, but I can't put them together. But to take the name of the table in front of each column name sounds really good!
Thanks for help so far, I guess I'll use this solution
Hi,
You can do using qualify keyword for the field names or
You can achieve this from single table by doing this approach.
Table:
Load
'Table1' AS TableName,
Field1,
Field2,..
From ..
Concatenate
Load
'Table2' AS TableName,
Field1,
Field2,..
From ..
By this you select the values using setanalysis for Table1 data use Sum({<TableName={'Table1'}>} Field2)
If you are comfortable with this approach you can use it.
Hope it helps
Celambarasan