dataimport:
LOAD
@1 AS CoCd,
@2 AS Period,
@3 AS [Doc. Date],
@4 AS [Pstng Date],
@6 AS Reference,
@7 AS DocumentNo,
@8 AS Crcy,
@9 AS Year,
@10 AS [Doc. Type]
FROM
\\cagta5454\Indirect\Clients\\zz Work-in-Progress\2014\data\*_110_*GLDetl*
;
我想要动态导入文件
的帮助目前的文件位于
\\cagta5454\Indirect\Clients\\zz Work-in-Progress\2014\data\*_110_*GLDetl*
我正在寻找一种方法,以便我能够进行动态导入
类似于创建变量
$dataLocation = \\cagta5454\Indirect\Clients\\zz Work-in-Progress\2014\data\*_
和$datafiles = '110','121','141'
因此我可以使用变量
而不是使用包含数据的文件的数字答案 0 :(得分:0)
for each ... next
功能可以为您服务。有关更多示例,您可以随时参考QV帮助文件c:\Program Files\QlikView\English.chm
或https://help.qlik.com/en-US/#
let dataFiles = '110, 121, 141';
for each i in $(datafiles)
let dataLocation = '\\cagta5454\Indirect\Clients\\zz Work-in-Progress\2014\data\*_' & '$(i)' & '_*GLDetl*';
dataimport:
Load
@1 AS CoCd,
@2 AS Period,
@3 AS [Doc. Date],
@4 AS [Pstng Date],
@6 AS Reference,
@7 AS DocumentNo,
@8 AS Crcy,
@9 AS Year,
@10 AS [Doc. Type]
From
$(dataLocation)
;
next