SQL Server Bulk Insert

后端 未结 7 1530
说谎
说谎 2021-01-19 05:54

I want to import a one column text file into one of my sql tables. The file is just a list of swear words.

I\'ve written the following TSQL to do this



        
7条回答
  •  庸人自扰
    2021-01-19 06:18

    You need to make sure the structure of your text file and the table match - if the table has two fields, then you will have to provide two fields/columns in the text file as well.

    Since the first column in the SQL table is an IDENTITY field, you can provide any value you want - but you have to have a value there, I don't think there's any way around this.

    Marc

提交回复
热议问题