Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qualify and joins, how to keep consistent table prefixes?

Hi guys. I've got two tables that I'm trying to join together. The first table I've called Products, and I want everything to be qualified except for the ID field. So I have:

qualify *;

unqualify ID;

Products:

SQL SELECT * FROM Products;

Then, I want to join some additional fields to that table, but I want these fields also to have the "Products.*" prefix. I can't seem to get this to work. If I do this:

Products:

LEFT JOIN (Products) SELECT * FROM Products2;

It will join all the new fields as "Products-1.*". Is there a good way to solve this without doing a laborious line by line renaming of all the fields?

Thanks!

Eric

3 Replies
Not applicable
Author

I have the same problem. Did you solve it?

Is there anyone who could help us?

Thanks

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

The "cheap" way of doing it is by individual renaming of the fields. To avoid keying it all in manually, I can suggest using Excel:

- copy the list of your fields into Excel.

- Create a formula using function CONCATENATE, that would take your field name and add text " AS Products.", with the optional brackets, etc...

- paste the resulting list into your QlikView script

The "lazy" but more "expensive" way (from the performance perspective) is to first prepare your table without Qualification, and then reload it once again using "Resident" load and qualify all the fields consistently at that point. If your data is small and load time is not a concern, - you can afford it, "without doing a laborious line by line renaming"...

cheers,

Not applicable
Author

Thanks Oleg. Sorry for my late gratitude... 🙂