Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

ivandrago
Contributor II

Concatenate unrelated fields - default field

HI,

I have two tables I am going to concatenate together, what should my default values be for dates, characters and values when I have fields that don't exist in one of the tables?

Thanks

1 Solution

Accepted Solutions
evan_kurowski
Valued Contributor

Re: Concatenate unrelated fields - default field

Hello Ivan Drago,


Forgive me, but... I must break you... by agreeing as has been pointed out, if you are combining just two tables and there is a section where only one of the tables has extra fields, you don't need to do anything extra for their data types, just load them in with their current formats unchanged.

However, when you start sequencing from many sources, it becomes helpful to remember the "first touch" principle, where the first load statement for a concatenated field "casts" it for all subsequent loads.  I put together an illustration that should cover some examples:

View solution in original post

5 Replies
Highlighted

Re: Concatenate unrelated fields - default field

please post sample data for both tables.

regards

Marco

MVP & Luminary
MVP & Luminary

Re: Concatenate unrelated fields - default field

The fields which belonged together and contain the same content should have the same field-names and formattings. By the other fields isn't this really important:

Data Types in QlikView

On Format Codes for Numbers and Dates

- Marcus

evan_kurowski
Valued Contributor

Re: Concatenate unrelated fields - default field

Hello Ivan Drago,


Forgive me, but... I must break you... by agreeing as has been pointed out, if you are combining just two tables and there is a section where only one of the tables has extra fields, you don't need to do anything extra for their data types, just load them in with their current formats unchanged.

However, when you start sequencing from many sources, it becomes helpful to remember the "first touch" principle, where the first load statement for a concatenated field "casts" it for all subsequent loads.  I put together an illustration that should cover some examples:

View solution in original post

Digvijay_Singh
Honored Contributor III

Re: Concatenate unrelated fields - default field

Hi,

Qlikview will put Null in the fields not available in other table, I think it doesn't matter what is the type of fields whether date, char which doesn't exists in other table as all such values will be null. Not sure if I understood the question.

TableA:

Field A, Field B

AAA, BBB

Concatenate

TableB:

Field A, Field C

AAA1, CCC

Output:

TableA:

Field A, Field B, Field C

AAA,   BBB, -(Null Symbol)

AA1, -(Null), CCC

Re: Concatenate unrelated fields - default field

Null.