Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

JOIN QVD to QVD or Other Method?

Hi Folks

I would like to reduce the content of data from SQL and from QVD's using some form of list, but I want this list to be very easy to maintain at the beginning of the script.

1. I have created a QVD file that contains a list of FUNDNAME.

2. I want to join from one QVD to this QVD using the FUNDNAME to match to CF_FUNDNAME so sort of like: LOAD * FROM A.QVD JOIN B.QVD WHERE A.FUNDNAME = B.CF_FUNDNAME

I'm pretty sure this isn't going to work!

What I don't want to do is to put WHERE clauses everywhere that utilise specific text such as LOAD * FROM B.QVD WHERE MATCH(FUNDNAME, 'CIP V')

But I don't have a problem writing some code like LOAD * FROM B.QVD WHERE MATCH(FUNDNAME, @FundVariable) as long as I can somehow define the variable as a list of values.

Anybody have any ideas on this?

Cheers,

Nigel.

1 Solution

Accepted Solutions
Not applicable
Author

seem to have a problem with cut and pasted code!

the where clause should have read

where ($(vGoldDC))

View solution in original post

4 Replies
Not applicable
Author

Hi Nigel,

Just set a script variable at the start e.g.



Set

and then substitite it everywhere you need to test e.g.

vGoldDC = '[DEBIT CODE] >= 9000 and [DEBIT CODE] <= 9009';



where

Hope this helps,

Gordon

($(vGoldDC))



Not applicable
Author

seem to have a problem with cut and pasted code!

the where clause should have read

where ($(vGoldDC))

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You could take this approach.

LOAD CF_FUNDNAME FROM B.QVD (qvd);
LOAD * FROM A.QVD (qvd) WHERE exists(CF_FUNDNAME, FUNDNAME);

-Rob

Not applicable
Author

Hi Rob, Gordon

Thanks for the input, both options would work for me, appreciate it.

Nigel.