我使用此guide在SSIS执行SQL任务中运行以下powershell:
param (
[string]$path = ""
)
cls
$data = gc $path
foreach ($line in $data){
"Processing: $($line.Substring(0,10))"
if ($line.Length -ne 512){
throw "Ragged File"
}
else {
continue
}
}
不幸的是,该任务不尊重throw
。它将简单地移过它并认为任务成功。任何帮助,将不胜感激。