diff --git a/Src/Asp.NetCore2/SqlSugar.AccessCore/Access/SqlBuilder/AccessInsertBuilder.cs b/Src/Asp.NetCore2/SqlSugar.AccessCore/Access/SqlBuilder/AccessInsertBuilder.cs index c20b4ebf2..7dcd19679 100644 --- a/Src/Asp.NetCore2/SqlSugar.AccessCore/Access/SqlBuilder/AccessInsertBuilder.cs +++ b/Src/Asp.NetCore2/SqlSugar.AccessCore/Access/SqlBuilder/AccessInsertBuilder.cs @@ -48,7 +48,7 @@ namespace SqlSugar.Access string columnsString = string.Join(",", groupList.First().Select(it => Builder.GetTranslationColumnName(it.DbColumnName))); if (isSingle) { - string columnParametersString = string.Join(",", this.DbColumnInfoList.Select(it => Builder.SqlParameterKeyWord + it.DbColumnName)); + string columnParametersString = string.Join(",", this.DbColumnInfoList.Select(it =>base.GetDbColumn(it, Builder.SqlParameterKeyWord + it.DbColumnName))); return string.Format(SqlTemplate, GetTableNameString, columnsString, columnParametersString); } else @@ -71,7 +71,7 @@ namespace SqlSugar.Access // batchInsetrSql.Append("\t\r\nUNION "); //} //temp+" Values ( " + string.Join(",", columns.Select(it => FormatValue(it.Value) )+")" - batchInsetrSql.Append($"{temp} values ({string.Join(",", columns.Select(it => FormatValue(it.Value)))}) "+UtilConstants.ReplaceCommaKey); + batchInsetrSql.Append($"{temp} values ({string.Join(",", columns.Select(it =>base.GetDbColumn(it,FormatValue(it.Value))))}) "+UtilConstants.ReplaceCommaKey); ++i; } pageIndex++; diff --git a/Src/Asp.NetCore2/SqlSugar.ClickHouseCore/ClickHouse/SqlBuilder/ClickHouseInsertBuilder.cs b/Src/Asp.NetCore2/SqlSugar.ClickHouseCore/ClickHouse/SqlBuilder/ClickHouseInsertBuilder.cs index 4221d30f0..c95a222f2 100644 --- a/Src/Asp.NetCore2/SqlSugar.ClickHouseCore/ClickHouse/SqlBuilder/ClickHouseInsertBuilder.cs +++ b/Src/Asp.NetCore2/SqlSugar.ClickHouseCore/ClickHouse/SqlBuilder/ClickHouseInsertBuilder.cs @@ -129,7 +129,7 @@ namespace SqlSugar.ClickHouse string columnsString = string.Join(",", groupList.First().Select(it => Builder.GetTranslationColumnName(it.DbColumnName))); if (isSingle) { - string columnParametersString = string.Join(",", this.DbColumnInfoList.Select(it => Builder.SqlParameterKeyWord + it.DbColumnName)); + string columnParametersString = string.Join(",", this.DbColumnInfoList.Select(it =>base.GetDbColumn(it, Builder.SqlParameterKeyWord + it.DbColumnName))); ActionMinDate(); return string.Format(SqlTemplate, GetTableNameString, columnsString, columnParametersString); } @@ -144,7 +144,7 @@ namespace SqlSugar.ClickHouse foreach (var item in groupList) { batchInsetrSql.Append("("); - insertColumns = string.Join(",", item.Select(it => FormatValue(it.Value, it.PropertyName))); + insertColumns = string.Join(",", item.Select(it =>base.GetDbColumn(it, FormatValue(it.Value, it.PropertyName)))); batchInsetrSql.Append(insertColumns); if (groupList.Last() == item) {