Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Extracting Data from the same table twice

I am trying to establish if works orders have been raised to manufacture parts internally.

So we sell to the customer F200-10 which is an assembly and a works order has to be raised to assembly this product.

The product consists of a number of parts, most are bought out items so are raised using a Purchase Order (Not a problem), but some are manufactured or sub assemblies which need a works order.

So as I see it I need to extract the data from my works order table twice chaning all field names by prefixing with a "sub_" or similar.

I tried adding the following to the end of my extract section but it made no difference and combined the two tables

FROM pelive.scheme.bmwodm as bmwodm_sub;

I could create a view in SQL to achieve this but would rather contain it in QlikView.

6 Replies
Not applicable
Author

This alias is only within the SQL query. In order to get two different tables you will have to change the QlikView table name and also, QlikView will concatenate tables that have identical structure, so you will have to either add a dummy column and get rid of it later, or tell QlikView to not concatenate them together by using the NoConcatenate prefix.

Not applicable
Author

I have altered the field names to make them unique, but how do I change the table name?

Not applicable
Author

You just go:

[Table 1]:

LOAD ...

[Table 2]:

LOAD ...

Not applicable
Author

hi hutchs

as of my understanding, am giving solutions,

LOAD a,

a as sub_a,

b,

b as sub_b,

from sourcefile;

(or do like below)

LOAD a,b from Sourcefile;

concatenate

LOAD a as sub_a,

b as sub_b

from Sourcefile;

Not applicable
Author

Thanks, this works a treat


Iassen Ivanov wrote:
[Table 1]:
LOAD ...
[Table 2]:
LOAD ...


Not applicable
Author

Great! Good to hear!

Cheers!