Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
deere2013
New Contributor II

join based on concat of two fields

I have a data set where I want to join to another data set by the concat of two fields.

example

MATERIALSAP REV ROWconcat
123456A123456A

so the concat field is what I would join the other table with.  I was thinking that I do this in the script upon the load...rather than load it twice

1 Solution

Accepted Solutions

Re: join based on concat of two fields

Hi

Try like this

Load

MATERIAL&SAP REV ROW as field_name

from tablename

3 Replies

Re: join based on concat of two fields

Hi

Try like this

Load

MATERIAL&SAP REV ROW as field_name

from tablename

bwisenosimenkg
Valued Contributor

Re: join based on concat of two fields

You create a composite key in your script:

Load *, MATERIAL & [SAP REV ROW] as %ConcatKey Inline [

MATERIAL, SAP REV ROW

123456,A

];

puttemans
Valued Contributor

Re: join based on concat of two fields

Hi there,

The script should look like this:


Table 1:

load *,

     MATERIAL&SAP REV ROW as linkname

FROM....

noconcatenate

Table 2  :

Load *,

    MATERIAL&SAP REV ROW as linkname

FROM....

(right/left/...)Join

Load *

Resident Table1;   

Community Browser