Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
mohdhaniff
Creator
Creator

How to add QlikView Header where the Header and Data located in different tables

Hi,

I m facing problem where the header and data separately in 2 different source. How can I join both files in Qlik View as single data with header?

3 Replies
shiveshsingh
Master
Master

Hi

Use below function to load your file.

rename fields

@1 to ID ,
@2 to  REG_NUMBER
;

First load the data file(Not header) in QV  and then using excel create this syntax by concatenation

@1 to ID

@2 to REG_NUMBER

so on..

jonathandienst

As there are no column names on your source is not clear how you want them linked or joined.

They do not necessarily need to be joined in QV, as they will associate via common fields. Simply load each file using alias names like:

Header:

LOAD @1 as NameOfField1,

     @2 as NameOfField2,

     ...

Table:

LOAD @1 as NameOfField1,

     @2 as NameOfField2,

     ...

If you need to join them, replace the second table name by

Join(Header)

Inner Join(Header)

Left Join(Header)

The join will be on the common field names.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
marcus_sommer
MVP & Luminary
MVP & Luminary

I think I would create a mapping-table from the header and renaming within it the fields from data-load maybe in this way:

Header:

crosstable(Field, Fieldname, 1)

LOAD  'Dummy' as Dummy, *

FROM [VEHICLE Header.TXT] (txt, codepage is 1252, no labels, delimiter is '\t');

MapRenameFields:

mapping load Field, Fieldname resident Header;

drop tables Header;

Data:

load * FROM [VEHICLE Data.TXT] (txt, codepage is 1252, no labels, delimiter is '\t');

rename fields using MapRenameFields;

- Marcus