Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

SQL or QV Scripting issue

Hi All,

Have 1 scenario.

Emp Table1: 100 records

Id Fname

Emp Table 2: 20 records

Id Fname


Now,

1. need to write SQL to fetch only 80 records

2. Write QV code to fetch only 80 records.

Please help.

6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

What you need is Qlik Exists function. Try below script.

Table2:

Load IdFrame

From xyz;

Table1:

Load IdFrame

From PQR where not exists(IdFrame);

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
vishsaggi
Champion III
Champion III

What is the actual script you are using where you have this issue?

May be you can try like

EMPTab1:

First 100 Load *;

SQL SELECT ID, Fname FROM yourtablename1;

EMPTab2:

First 20 Load *;

SQL SELECT ID, Fname FROM yourtablename2;

Noconcatenate

FinalTab:

First 80 LOAD * Resident EMPTab1;

Drop Table EMPTab1;

shiveshsingh
Master
Master

What logic you want here?

Are 100 and 20 records having same value?

Can you share the script that you are using? on what logic you want to select 80 records?

Anonymous
Not applicable
Author

Interview Question for Project. The records in the Table must be common no First Load or something like that.

Anonymous
Not applicable
Author

Thank you Kaushik. I told the same ans but I guess the Interviewer was not satisfied or I might had lacked the confidence even if it was correct.

vishsaggi
Champion III
Champion III

‌nnot clear can you elaborate a little?