Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the following in my script which hard codes file locations..
For each vDirectory in 'C:\Temp1' ,'C:\Temp2'
I have a field in a QVD which holds all of the file locations i need. what i want to do is use that field instead of hardcoding.
At the moment the field isn't being loaded in at all, so i guess the first thing i need to do is load this field into its own table, but i do not know what to do after that.
Can anyone help please?
Try something like this
Tmp_dirlist:
LOAD concat( chr(39) & dirlist & chr(39), ',') as dirlist
From dirlist.qvd ;
LET vDirlist = peek(dirlist) ;
Drop table Tmp_dirlist;
For each vDirectory in $(vDirlist)
...( rest of your script)
Hi,
You can do like below:
SET vSAP = 'Demo';
Directory \.......\SourceDocuments\qvd\SAP\$(vSAP)\;
Thanks,
AS
sorry i dont understand. what does Demo relate to?
Hi Hopkinsc,
something like the below should work for you, you'll need to create a concat list from your qvd and then loop through based on that
(assuming your directory paths are in rows and not in a list already)
LOAD
Concat(Distinct DIRLIST,',') AS Dir_List
FROM
[YourQVDName.qvd]
(qvd);
Let vDirList = Peek('Dir_List');
For Each Dir In $(vDirList)
//your code here
Next
hope that helps
Joe
Say your Folder name is Demo from where you are reading your data.
Thanks,
AS
That what the OP has and is trying to avoid.
Sorry James my mistake
Thanks,
AS
Try something like this
Tmp_dirlist:
LOAD concat( chr(39) & dirlist & chr(39), ',') as dirlist
From dirlist.qvd ;
LET vDirlist = peek(dirlist) ;
Drop table Tmp_dirlist;
For each vDirectory in $(vDirlist)
...( rest of your script)