Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a main table:
t1:
LOAD * INLINE [ id, ts, col1, col2 ,col3 1, t1, . . . 1, t2, . . . 1, t3, . . .
1, t4, . . . 2, t5, . . . 2, t6, . . . 3, t7, . . . ];
Where id and ts (time-stamp) are really the only important columns for this example, however my table has about 25 total.
I have another table, which I want to use to more or less filter the larger one. Table1 has all the contents of table2. The tables above and below are a small sample of much larger tables.
LOAD * INLINE [ id, ts,
1, t2,
1, t4,
2, t5,
3, t7, ];
Essentially I want the final product to look like this:
id | ts | col1 | col2 | col3 |
1 | t2 | . | . | . |
1 | t4 | . | . | . |
2 | t5 | . | . | . |
3 | t7 | . | . | . |
Essentially what is happening is im joining the bigger table onto the smaller one and only keeping all the extra columns from the large table as long as their respective `id` and `ts` exist in the smaller table
I think you can filter in the script with a KEEP
http://qlikviewapuntes.blogspot.com/2014/01/esquema-keep.html
try with this script
t1:
LOAD * INLINE [
id, ts, col1, col2 ,col3
1, t1, . . .
1, t2, . . .
1, t3, . . .
1, t4, . . .
2, t5, . . .
2, t6, . . .
3, t7, . . .
];
t2:
LOAD * INLINE [
id, ts,
1, t2,
1, t4,
2, t5,
3, t7,
];
trk:
RIGHT KEEP (t1)
LOAD id, ts
RESIDENT
t2;
DROP TABLE t2;
DROP TABLE trk;