Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
seem to have a problem with cut and pasted code!
the where clause should have read
where ($(vGoldDC))
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))seem to have a problem with cut and pasted code!
the where clause should have read
where ($(vGoldDC))
You could take this approach.
LOAD CF_FUNDNAME FROM B.QVD (qvd);
LOAD * FROM A.QVD (qvd) WHERE exists(CF_FUNDNAME, FUNDNAME);
-Rob
Hi Rob, Gordon
Thanks for the input, both options would work for me, appreciate it.
Nigel.