Мне нужно решение для задачи, над которой я работаю.Мне нужно загрузить несколько файлов CSV в таблицу сервера SQL.ВСЕ CSV имеют одинаковую структуру.
Источник CSV находится в таблице сервера sql.
Структура SOURCE_TABLE.
ID -> Primary Key - IDENTITY
Path -> Varchar(100)
Данные Source_Table
ID Path
1 c:\1.csv
2 c:\2.csv
3 c:\x.csv
.
.
.
.
Структура Target_Table (в этой таблице нет первичного ключа).
ID - INT -> Foreign key from Source Table. (This is NOT primary key)
Date - Today Date&Time
1 --> All 1 through 5 are headers from CSV file. basically they are the contents from the csv file
2
3
4
5
Таблица назначения содержит TARGET_TABLE
ID DateTime <-and the columns from CSV file ->
1 Today x y z -> contents of c:\1.csv
1 Today 1 2 3 -> contents of c:\1.csv
1 Today 4 5 6 -> contents of c:\1.csv
1 Today x y z -> contents of c:\1.csv
2 today sdf sdf sdf -> contents of c:\2.csv
2 today sdf sdf sdf -> contents of c:\2.csv
2 today sdf sdf sdf -> contents of c:\2.csv
2 today sdf sdf sdf -> contents of c:\2.csv
2 today sdf sdf sdf -> contents of c:\2.csv
3 today sdfs sds sdf -> contents of c:\x.csv
3 today sdfs sds sdf -> contents of c:\x.csv
3 today sdfs sds sdf -> contents of c:\x.csv
3 today sdfs sds sdf -> contents of c:\x.csv
3 today sdfs sds sdf -> contents of c:\x.csv
и т. Д. ...
Идентификатор в TARGE_TABLE должен совпадать с идентификатором в SOURCE TABLE
. Любая помощь приветствуется.