【发布时间】:2017-05-30 01:02:17
【问题描述】:
我在 ssis 包的派生列表达式中编写了以下代码。
我从源接收的输入值:-
Q:\SOURCE\RV_T\PCL_RVT\RVT_export_all_2011-02-14_08.38.00_Emerald.xlsx
我想要:- RVT_export_all_2011-02-14_08.38.00_Emerald.xlsx
Substring(@[User::V_FilePath],LEN(@[User::V_FilePath]) - Charindex("\",Reverse(@[User::V_FilePath]))+2,LEN(@[User::V_FilePath]))
它在 SSMS 中运行良好,但在 SSIS 中出现以下错误
DFT 出错 - 加载数据 [派生列 [8]]:尝试解析 表达式“子字符串(@[User::V_FilePath],LEN(@[User::V_FilePath]) - Charindex("\",Reverse(@[User::V_FilePath]))+2,LEN(@[User::V_FilePath]))" 失败的。行号“1”、字符号“68”处的标记“””是 未识别。无法解析表达式,因为它包含 指定位置的无效元素。
DFT 出错 - 加载数据 [派生列 [8]]:无法解析 表达式“子字符串(@[User::V_FilePath],LEN(@[User::V_FilePath]) - Charindex("\",Reverse(@[User::V_FilePath]))+2,LEN(@[User::V_FilePath]))"。 表达式无效,或存在内存不足错误。
DFT 时出错 - 加载数据 [派生列 [8]]:表达式 "子字符串(@[User::V_FilePath],LEN(@[User::V_FilePath]) - Charindex("\",Reverse(@[User::V_FilePath]))+2,LEN(@[User::V_FilePath]))" 关于“派生列。输出[派生列 输出].Columns[filenaemfrompat]" 无效。
DFT 出错 - 加载数据 [派生列 [8]]:无法设置属性 “派生列”上的“表达式”。输出[派生列 输出].Columns[filenaemfrompat]".
请提出建议。 提前谢谢...
【问题讨论】: