You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Migrator/Framework/ITransformationProvider.cs
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -346,13 +346,14 @@ public interface ITransformationProvider : IDisposable
346
346
347
347
/// <summary>
348
348
/// Copies data from source table to target table using INSERT INTO...SELECT..FROM
349
+
/// Be aware that the order of <paramref name="sourceColumnNames"/> and <paramref name="targetColumnNames"/> matters.
349
350
/// </summary>
350
351
/// <param name="sourceTableName"></param>
351
352
/// <param name="sourceColumnNames"></param>
352
353
/// <param name="targetTableName"></param>
353
354
/// <param name="targetColumnNames"></param>
354
355
/// <param name="orderBySourceColumns">Sort source by these columns. <paramref name="sourceColumnNames"/> must contain the <paramref name="orderBySourceColumns"/>.
varorderByComponent=!string.IsNullOrWhiteSpace(orderBySourceColumnsJoined)?$"ORDER BY {orderBySourceColumnsJoined}":null;
869
870
870
-
varsql=$"INSERT INTO {targetTableNameQuoted} ({targetColumnsJoined}) SELECT {sourceColumnsJoined} FROM {sourceTableNameQuoted} ORDER BY {orderBySourceColumnsJoined}";
871
+
List<string>sqlComponents=
872
+
[
873
+
$"INSERT INTO {targetTableNameQuoted} ({targetColumnsJoined}) SELECT {sourceColumnsJoined} FROM {sourceTableNameQuoted}",
varorderByComponent=!string.IsNullOrWhiteSpace(orderBySourceColumnsJoined)?$"ORDER BY {orderBySourceColumnsJoined}":null;
913
914
914
-
varsql=$"INSERT INTO {targetTableNameQuoted} ({targetColumnsJoined}) SELECT {sourceColumnsJoined} FROM {sourceTableNameQuoted} ORDER BY {orderBySourceColumnsJoined}";
915
+
List<string>sqlComponents=
916
+
[
917
+
$"INSERT INTO {targetTableNameQuoted} ({targetColumnsJoined}) SELECT {sourceColumnsJoined} FROM {sourceTableNameQuoted}",
varorderByComponent=!string.IsNullOrWhiteSpace(orderBySourceColumnsJoined)?$"ORDER BY {orderBySourceColumnsJoined}":null;
1828
1829
1829
-
varsql=$"INSERT INTO {targetTableNameQuoted} ({targetColumnsJoined}) SELECT {sourceColumnsJoined} FROM {sourceTableNameQuoted} ORDER BY {orderBySourceColumnsJoined}";
1830
+
List<string>sqlComponents=
1831
+
[
1832
+
$"INSERT INTO {targetTableNameQuoted} ({targetColumnsJoined}) SELECT {sourceColumnsJoined} FROM {sourceTableNameQuoted}",
varorderByComponent=!string.IsNullOrWhiteSpace(orderBySourceColumnsJoined)?$"ORDER BY {orderBySourceColumnsJoined}":null;
120
121
121
-
varsql=$"INSERT INTO {targetTableNameQuoted} ({targetColumnsJoined}) SELECT {sourceColumnsJoined} FROM {sourceTableNameQuoted} ORDER BY {orderBySourceColumnsJoined}";
122
+
List<string>sqlComponents=
123
+
[
124
+
$"INSERT INTO {targetTableNameQuoted} ({targetColumnsJoined}) SELECT {sourceColumnsJoined} FROM {sourceTableNameQuoted}",
0 commit comments