Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
逐行将单词导入sql server_Sql_Sql Server - Fatal编程技术网

逐行将单词导入sql server

逐行将单词导入sql server,sql,sql-server,Sql,Sql Server,我有一个常规的文本文件,其中包含拼写检查器的拼写 归档以下内容的最佳方式是什么 每行有一个单词 如何将其导入数据库,以便运行ssrs报告 它 它不应该导入表中已经存在的单词 我在我的dev box上运行sql servr 2005,与大多数数据导入任务一样,我强烈建议您使用暂存表。因此,遵循以下过程: 创建一个临时表(听起来像是一个只有一列的表) 将数据加载到暂存表中(bulkinsert) 使用此表加载到最终表中 删除临时表 第三步: insert into t (word)

我有一个常规的文本文件,其中包含拼写检查器的拼写

归档以下内容的最佳方式是什么

  • 每行有一个单词

  • 如何将其导入数据库,以便运行ssrs报告 它

  • 它不应该导入表中已经存在的单词

我在我的dev box上运行sql servr 2005,与大多数数据导入任务一样,我强烈建议您使用暂存表。因此,遵循以下过程:

  • 创建一个临时表(听起来像是一个只有一列的表)
  • 将数据加载到暂存表中(
    bulkinsert
  • 使用此表加载到最终表中
  • 删除临时表
第三步:

insert into t (word)
    select s.word
    from staging s
    where s.word not in (select t.word from t);

与大多数数据导入任务一样,我强烈建议您使用暂存表。因此,遵循以下过程:

  • 创建一个临时表(听起来像是一个只有一列的表)
  • 将数据加载到暂存表中(
    bulkinsert
  • 使用此表加载到最终表中
  • 删除临时表
第三步:

insert into t (word)
    select s.word
    from staging s
    where s.word not in (select t.word from t);