Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jfung148
Creator
Creator

Merging/Combining data in QV

hi all

this is a weird question

not even sure if I can do this

lets say I have 2 dbs.. and 2 tables

but both have the same data types in it.. like product/prod info/prod pic/etc

same header names...

but db1 has info from yr 1 - 5

db2 has yr 6-future

how do I combine them on one qv and make it show seamlessly all products from yr 1 - future?

I tried just putting it in one load and naming both the same and it gave me a loop error

thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If the structure of both tables is the same, you should concatenate the two tables:

PRODUCT:

LOAD Product,

          ProdInfo,

          Price,

         'A' as Source

FROM TableA;

CONCATENATE (PRODUCT)

LOAD Product,

         ProdInfo,

          Price,

         'B' as Source

FROM TableB;

Note that QV will autoconcatenate tables with same name and number of fields, CONCATENATE will make it more explicite and also force concatenation if structure is not 100% the same.

View solution in original post

5 Replies
swuehl
MVP
MVP

If the structure of both tables is the same, you should concatenate the two tables:

PRODUCT:

LOAD Product,

          ProdInfo,

          Price,

         'A' as Source

FROM TableA;

CONCATENATE (PRODUCT)

LOAD Product,

         ProdInfo,

          Price,

         'B' as Source

FROM TableB;

Note that QV will autoconcatenate tables with same name and number of fields, CONCATENATE will make it more explicite and also force concatenation if structure is not 100% the same.

View solution in original post

jfung148
Creator
Creator
Author

this works.. kinda

can u concatenate 4 tables together?

I did 2 and it works.. but when I add 3 and 4.. I don't get the extra data..

not sure why

thanks

swuehl
MVP
MVP

Concatenation also works with multiple tables.

How does your script look like?

vishsaggi
Champion III
Champion III

Does the other two tables has same number of fields and hope you are using Concatenage(PRODUCT) between all the tables ?

jfung148
Creator
Creator
Author

@Stefan and vish

yes I was not concatenating the right amount of fields..  db 3 had one (matching field).. and db 4 had 2 matching fields

I needed to join 2,3,4 together then concatenate

thanks all