Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm a Qlikview end-user and I have a question regarding the resident function.
I can't use it but I think the program is good.
I need to load this data
Load
WP
Resident YourTable;
Can you help me please?
Thanks
Best regards
resident is used if data should be loaded from a previously loaded input table.
Resident table is virtually used the previously loaded table.
it is something like virtual class available in some object oriented programming language.
Yes, I know but how I can use it?
Load
WP
Resident YourTable;
WP is an important data for me
I must load data which exists already in a previously loaded input table.
Hi,
Yes, Resident is used on previously loaded tables to load data from previously loaded table
Like in your example
YourTable:
Load
WP,
Col,,,
From Data
Load
*,
WP
Resident YourTable;
Some thing like this
Regards,
Anand
Hi,
See the attached sample file
YourData:
load * inline
[
ColA,WP
A,14
B,12
B,10
C,14
C,17
D,16
];
Residenttable:
Load
ColA as NewField1,
WP as NewField2
Resident YourData;
Regards,
Anand
Hi,
RESIDENT always refers to a previously loaded table, so in your script above, "YourTable" must exist prior to the table you are loading. Example:
Customers: // This table already exists, you keep it as it is
LOAD ID,
Name,
Address,
Country,
RepNo
FROM File.qvd (qvd);
LocalCustomers: // This is the new table you are creating
LOAD ID AS LocalID,
Name AS LocalName
RESIDENT Customers // load from the table above
WHERE Country = 'ES'; // only local customers
Is that correct?
BI Consultant
Hi,
Yes correct like if you want to load data of ColA='B'
then
YourData:
load * inline
[
ColA,WP
A,14
B,12
B,10
C,14
C,17
D,16
];
Residenttable:
Load
ColA as NewField1,
WP as NewField2
Resident YourData
Where ColA='B';
Regards
Anand
Hi,
Note that according to your script you are loading only one field, that is not being renamed. That means that you are likely not to see that field, because it already exists in a different table. Do as I mentioned below, rename the field, and add some dummy field so you can check the new table you have created.
Regards.
BI Consultant