Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
vishnus85
Contributor

Urgent : Doubt in Load statement

Hi All,

I have two resident tables sa A and B both having student_id field as common.

I need to devise a load statement to create a table C such as

C:

LOAD *

RESIDENT A

WHERE student_id in

(LOAD student_id

RESIDENT B);

just like we use in select statements like -- select * from table A where student_id in (select student_id from table B)

I know that the above code is wrong and ofcourse it is not working.

Please help me to find a solution for my requirement.

Regards,

Vishnu S

Tags (2)
1 Solution

Accepted Solutions

Re: Urgent : Doubt in Load statement

Hi Vishnu,

I'd do as follows:

B:

LOAD student_id

FROM FileB.qvd (qvd); // or whatever the source

A:

LOAD *

FROM FileA.qvd (qvd)

WHERE Exists(student_id); // will load only records where student_id is in table B

DROP TABLE B;

Hope that helps.

Miguel

3 Replies
MVP
MVP

Re: Urgent : Doubt in Load statement

Use INNER JOIN like:

C:

LOAD *

RESIDENT A;

INNER JOIN

LOAD student_id

RESIDENT B;

Re: Urgent : Doubt in Load statement

Hi Vishnu,

I'd do as follows:

B:

LOAD student_id

FROM FileB.qvd (qvd); // or whatever the source

A:

LOAD *

FROM FileA.qvd (qvd)

WHERE Exists(student_id); // will load only records where student_id is in table B

DROP TABLE B;

Hope that helps.

Miguel

Not applicable

Re: Urgent : Doubt in Load statement

Just like Miguel said, doing as he mention you get one more advantage... all LOAD statements are optimezed.

Community Browser