Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

upaliwije
Contributor II

Match Records from two QVD Files

I have two qvd files with following Fields

QVD 1

IDNO,PRD,CLASS,AMOUNT

QVD 2

IDNO, COUNT

I want to load data from table qvd1 if IDNO exists in table qvd2. Please help me to write the script

1 Solution

Accepted Solutions
kumarkp412
Contributor II

Re: Match Records from two QVD Files

QVD 1

ID NO,PRD,CLASS,AMOUNT from..........

where exits(IDNO);

Concatenate

QVD 2

IDNO, COUNT

from...........

7 Replies

Re: Match Records from two QVD Files


Hi,

Use exists() in where clause of first qvd

Regards,

Regards,
Prashant Sangle
upaliwije
Contributor II

Re: Match Records from two QVD Files

Thanks Max

Could you please write the full script

Re: Match Records from two QVD Files

Hi,

Try like this

Final_qvd

Load IDNO as temp_IDNO,

COUNT

from QVD2;

join

load *

from QVD1

where exists(temp_IDNO,IDNO);

Regards,

Regards,
Prashant Sangle
Not applicable

Re: Match Records from two QVD Files

Hi,

You can use Keep Keyword to do this

use this Script

LOAD IDNO,

     Count

FROM

D:\Vivek\Community\QVD2.qvd

(qvd);

Left Keep

LOAD IDNO,

     PRD,

     CLASS,

     AMOUNT

FROM

D:\Vivek\Community\QVD1.qvd

(qvd);

Regards,

Vivek

kumarkp412
Contributor II

Re: Match Records from two QVD Files

QVD 1

ID NO,PRD,CLASS,AMOUNT from..........

where exits(IDNO);

Concatenate

QVD 2

IDNO, COUNT

from...........

upaliwije
Contributor II

Re: Match Records from two QVD Files

Thanks all

Re: Match Records from two QVD Files

Hi,

If you dont want to join two tables

then

Try like this

QVD1:

Load IDNO as temp_IDNO,

COUNT

from QVD2;

QVD1:

load *

from QVD1

where exists(QVD1.temp_IDNO,IDNO);

Regards,

Regards,
Prashant Sangle
Community Browser