mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-11 13:53:20 +00:00
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:
@@ -108,7 +108,7 @@ function ConvertFrom-ExcelToSQLInsert {
|
|||||||
'NULL'
|
'NULL'
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
"'" + $record.$propertyName + "'"
|
"'" + (($record.$propertyName.ToString()) -replace "'","''") + "'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$targetValues = ($values -join ", ")
|
$targetValues = ($values -join ", ")
|
||||||
|
|||||||
Reference in New Issue
Block a user