私はこのようなファイルにテキストを持っています:
In the name of God, the Mercy-giving, the Merciful! (1)
Praise be to God, Lord of the Universe, (2)
the Mercy-giving, the Merciful (3)
Ruler on the Day for Repayment! (4)
...
次に、次のような 2 つのフィールドを持つテーブル:
TextData Varchar(max) NoNullable
Id Int NoNullable Identity(1,1)
このクエリを使用する場合:
bulk insert MyDb.dbo.translation
FROM 'd:\IRVING.Arb'
WITH
(
ROWTERMINATOR ='\n',
codepage='1256'
)
(0 行が影響を受けます)
しかし、テーブルから Id 列を削除すると、すべての行データがコピーされます。
ファイルの行番号を Id 列に保存するにはどうすればよいですか?