Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add order Hints for Bulk Copy operations #2472

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Escape the column name in the order hints with square bracket correctly
  • Loading branch information
mobilebilly committed Jul 7, 2024
commit 8da2481f933c9e0a6bca9780cb536fd69c69679d
Original file line number Diff line number Diff line change
Expand Up @@ -1619,9 +1619,9 @@ private String createInsertBulkCommand(TDSWriter tdsWriter) throws SQLServerExce

if (columnName.contains("]")) {
String escapedColumnName = columnName.replaceAll("]", "]]");
orderHintText.append(escapedColumnName).append(" ").append(sortOrderText).append(", ");
orderHintText.append("[").append(escapedColumnName).append("] ").append(sortOrderText).append(", ");
} else {
orderHintText.append(columnName).append(" ").append(sortOrderText).append(", ");
orderHintText.append("[").append(columnName).append("] ").append(sortOrderText).append(", ");
}
}

Expand Down