Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Joining MySQL tables from different sources

I'm having issues joining tables from different databases. One table only exists on one database. When I attempt to join them through Qlikview I am getting null values in different rows. Here is a visual:

Unique_Key
Yes/NoEmployee_1Employee_2Text_1Text_2Text_3On/OffCount
123456Yes-Michael JacksonTextTextText--
-James Brown----On1
1234567-James Brown----Off1
No-Michael JacksonTextTextText--

The dashes represent null values. Is there a way to join SQL tables in Qlik where the end result is 1 row of values for each Unique_Key?

3 Replies
Anonymous
Not applicable
Author

It looks like a result of concatenate rather than join.  Can you share the script or upload the app?

Not applicable
Author

Unfortunately no I can't upload the app.

Basically, "Employee_1" is the only info I need from the table cross databases. So Table_1 is grabbing the data, and Table_2 is also grabbing the data, resulting in multiple rows. As you can see though, the data exists in only 1 column, not both.

I was wondering if there was some sort of Qlik function where I could combine rows.

Anonymous
Not applicable
Author

But you can show the portions of the script, can't you?  So far is not clear how exactly you're tying to join.

If you have Table1 with a Key and Field_A and Table2 with Key and Field_B, it should be

Table:

LOAD Key, Field_A;

SQL SELECT Key, Field_A FROM Table1;

JOIN (Table) LOAD Key, Field_B;

SQL SELECT Key, Field_B FROM Table2;