Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
LOAD DISTINCT FileName() AS [QVD_File]
FROM [First QVD\*$(vRecord)*.qvd] (qvd)
WHERE WildMatch(FileName(),'*ABC*') = 0
What is the effective meaning of the path after FROM if vRecord is some variable ?
Yes record is a variable. You are trying to read the filename() of all qvd files that have a file name containing this vvariable. One exception, you do not want to select the filename from any qvd file containing ABC in its file name.
basically $(xxx) always represents the value of variable.
in this case you have plents of Qvd files availble in the connection named as "First QVD" out of that you are loading the file which matches the value of variable vRecord
Yes record is a variable. You are trying to read the filename() of all qvd files that have a file name containing this vvariable. One exception, you do not want to select the filename from any qvd file containing ABC in its file name.
If you find your script to run slowly then it is because you are looking for a distinct filename on all rows in all the qvd files in your wildcard path.
I think you will find it faster to execute if you only load one row per file by adding a FIRST 1 to your load like this.
FIRST 1 LOAD DISTINCT FileName() AS [QVD_File]
FROM [First QVD\*$(vRecord)*.qvd] (qvd)
WHERE WildMatch(FileName(),'*ABC*') = 0;