There is an issue with the ConvertFromExcelToSQLInsert where a quote in the text will not be converted properly and will cause invalid insert statements to be created, this commit makes the correction to handle the scenario.
This commit is contained in:
Ben Becker
2019-11-20 08:13:11 -05:00
committed by Ben Becker
parent 6f2e7d682b
commit 5617a960ec

View File

@@ -108,7 +108,7 @@ function ConvertFrom-ExcelToSQLInsert {
'NULL'
}
else {
"'" + $record.$propertyName + "'"
"'" + (($record.$propertyName.ToString()) -replace "'","''") + "'"
}
}
$targetValues = ($values -join ", ")