Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
denis115
Creator
Creator

qvd

Hello!

Help me to use it :

SELECT
field1,

field2

from table1

where field1 in (load field from table2.qvd(qvd));

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

You can use an INNER JOIN with a filter table, or the QlikView Exists() function (requires more steps since you start with a SQL SELECT) or an ApplyMap() (also less than optimal due to the SQL SELECT). The INNER JOIN is easiest, I think:

Table:

LOAD DISTINCT Field AS Field1

FROM Table2.QVD (QVD);

INNER JOIN (Table)

SQL SELECT Field1, Field2

FROM "Table1";

Leaves no traces, no cleanups to do. Just the data you want.

View solution in original post

9 Replies
denis115
Creator
Creator
Author

or maybe where field1 in (select from excel)

sasikanth
Master
Master

Try this

Temp:

Load

          Field as Field1,

From Table2.qvd ;

Final:

Select Field1,

          Field2

From Table1 where exists(Field1);

Drop table Temp;

shiveshsingh
Master
Master

T1: load field as field1 from table2.qvd(qvd));

left join(T1)

SELECT
field1,

field2

from table1

denis115
Creator
Creator
Author

will it  join fileds from table1 and table 2?

if yes I dont need this, I want to select only some data from table 1 and for this I ve created a qvd file that have field 1 like I need  

sasikanth
Master
Master

You can use Keep here

Final:

Load Field1,

          Field2

From table 2;

Left Keep

Temp:

Load Field  as Field1

From Excel;

Drop table Temp;

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You can use an INNER JOIN with a filter table, or the QlikView Exists() function (requires more steps since you start with a SQL SELECT) or an ApplyMap() (also less than optimal due to the SQL SELECT). The INNER JOIN is easiest, I think:

Table:

LOAD DISTINCT Field AS Field1

FROM Table2.QVD (QVD);

INNER JOIN (Table)

SQL SELECT Field1, Field2

FROM "Table1";

Leaves no traces, no cleanups to do. Just the data you want.

denis115
Creator
Creator
Author

it will join field 1 from table2.qvd with field 1 from table1?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You do understand how a JOIN works, don't you? All fields with identical names will cause their values to be matched. An INNER JOIN will reduce Table2 by keeping only those Field1 rows that have corresponding Field1 values in Table1.

Matching fields will not have their values concatenated.

denis115
Creator
Creator
Author

THANK YOU!