Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
inigoelv
Creator
Creator

CONECTION TABLES

Hi,

I have a problem with two tables:

DayWorker
01/01/2013A
02/01/2013A
03/01/2013A
04/01/2013A

DayProduction
01/01/201310
02/01/201320
04/01/201340

When the two tables are conected the first table lose one row, 03/01/2013, because of there is not production. The problem is that I need this row and not to lose.

In Access it is solved because it is possible to change the relation and show all data of a table (include all register of one table and only the ones in common of the other).

I need to count all rows of the first table.

Thanks in advance

Best regards,

3 Replies
Anonymous
Not applicable

If you are using the Join command in the script, try Left Join instead.  It will keep everything from the first table and only Join  Day from the second table that exist in the first.

Table1:

Load

     Day as %Day,

    1      as DayCounter, //used to count Day

     Worker

From Table 1;

Left Join (Table1)

Table2:

Load

     Day as %Day,

     Production

From Table 2;

DayWorkerProduction
01/01/2013A10
02/01/2013A20
03/01/2013A-
04/01/2013A40
jagan
Luminary Alumni
Luminary Alumni

HI,

As Micheal specified in the above post use Left Join so that you don't miss any rows in the first table.

Table1:

Load

    *

From Table 1;

Left Join (Table1)

Table2:

Load

    *

From Table 2;

Hope this helps you.

Regards,

Jagan.

Not applicable

Try with mapping load to fill out null values as well.

MAP_PROD:

Mapping LOAD DATE, PRODUCTION FROM TABLE ;

WORKER_INFO:

LOAD DATE,

          WORKER,

          ApplyMap('MAP_PROD', DATE , 'ND');

FROM TABLE;

So if the Production is not exist for date, ND will be inserted by ApplyMap.