Import CSV into DB using SSIS
Step 1: create a table
CREATE TABLE [EmployeeImported](
[EmployeeID] [int] IDENTITY(1,1) NOT NULL,
[ContactID] [int] NOT NULL,
[ManagerID] [int] NULL,
[Title] [varchar](100) NOT NULL,
[MaritalStatus] [char](1) NOT NULL,
[Gender] [char](1) NOT NULL,
[HireDate] [datetime] NOT NULL
) ON [PRIMARY]
GO
Step 2: open SQL Server Business Intelligence studio. Select Integration Services Project
Step 3: Click on Control Flow and drag Data Flow Task to the right side pan
Step 3: Double click on the Control Flow task.
Step 4:It will take you to Data Flow pan.
Step5:Drag Flat File Source from Toolbox to Data Flow task pan.
Step 6: Configure New Connection by clicking New.
Step 7: Select the Path of the file and specify Text Qualifier. For me the text qualifier is comma(,).
Step 8: Click on Columns and adjust OutputColumnWidth – match it with width of your original data. If you do not know leave it as default (at 50).
Step 9: Click on on following screen.
Step 10: Now Select OLE DB Destination from right side Toolbox and drag to below the Flat File Source.
Step 11: Put them near to each other ad demonstrated below.
Step 12: Connect Green Arrow of Flat File Source with OLE DB Destination.
Step 13: Double click on OLE DB Destination and connect to the database and table created earlier in the code.
Step 14: After configuring connection the mapping needs to be adjusted as well.
Step 15: Now on mappings tab connect both the size. I have not connected very first column as it is identify column for me.
Step 16: Clicking OK will bring me to following screen.
Step 17: Now click on F5 and it will execute the package in debug mode.
More Info please client below url:
http://blog.sqlauthority.com/2011/05/12/sql-server-import-csv-file-into-database-table-using-ssis/
Import CSV into DB using SSIS的更多相关文章
- SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL Server
CSV stands for Comma Separated Values, sometimes also called Comma Delimited Values. Create TestTabl ...
- 使用solr将CSV/XML/DB/JSON数据发布为Rest Service
Download http://lucene.apache.org/solr/downloads.html Apache Solr入门基础——Windows下安装与配置 https://blog.cs ...
- xls===>csv tables===via python ===> sqlite3.db
I've got some files which can help a little bit to figure out where people are from based on their I ...
- python提取百万数据到csv文件
转自:http://www.2cto.com/kf/201311/258112.html 今天有需求,需要把系统所有用户注册的id和邮箱等信息导出来提供给他们,在mysql里面count了下,大概有3 ...
- python mongodb 读写CSV文件
# -*- coding: utf-8 -*-import osimport csvimport pymongofrom pymongo import MongoClient #建立连接client ...
- jmeter读取执行case插入DB生成报表和备份记录
前言:由于通过jmeter写的接口自动化木有数据导入和统计分析功能,因此做了2次开发,目的是读取每条case获取接口名称和用例名称,通过获取的case执行结果进行计算,得到详细接口的用例通过率存入DB ...
- 通过ant-jmeter读取jtl文件拆分数据并insert DB
前言:之前详解过通过jmeter生成的csv文件,解析csv存入DB,这个有弊端 第一:需独立创建一个job 第二:需按照一定规范输出 因此,放弃解析csv方式,直接解析自动化生成的原始jtl文件并集 ...
- Python网络数据采集3-数据存到CSV以及MySql
Python网络数据采集3-数据存到CSV以及MySql 先热热身,下载某个页面的所有图片. import requests from bs4 import BeautifulSoup headers ...
- csv格式的数据存储到mysql
python写的,有点冗余,先码出来~~~~ 这是data_stored.py的代码 # -*- coding:utf-8 -*- # 存数据到mysql (只存了时间数字) import pymys ...
随机推荐
- 汕头市队赛 SRM10 T1模拟只会猜题意
模拟只会猜题意 SRM 10 描述 有一本n个单词的词典,求按下列方法能造出的不相同的词汇数目. 1.词典中的单词是一个词. 2.能分为两部分的,其中前一部分是一个词典词或者其非空前缀,后一部分是一 ...
- noip 2010 三国游戏
三国游戏 三国游戏 描述 小涵很喜欢电脑游戏,这些天他正在玩一个叫做<三国>的游戏. 在游戏中,小涵和计算机各执一方,组建各自的军队进行对战.游戏中共有N 位武将(N为偶数且不小于4),任 ...
- Balanced Photo(USACO)
题目大意: 我们有一个数列,数列中有n个数,对于一个数ai,在它左边的比他大的数的个数为li,右边比他大的数的个数为ri,若li,ri中的较大者比较小者的两倍还大,那么他就是一个不平衡数,求不平衡数的 ...
- 牧场行走(LCA)
神奇传送门 好吧,这题很有意思.. 第一眼撇的时候还以为是(SPFA)呜.... 然后发现要Q次询问就想到了LCA 但是发现不是求LCA.. 于是想到了一个神奇的定律: 两点的LCA一定在u到v的最短 ...
- bash shell 文本文件操作
一.打开文本文档,查看文本的内容,我们最直观的方式就是用编辑器,并且可以使用vi内部的查找命令查找[参见Vim文字编辑] vi test.txt#使用vi打开当前目录下的test.txt文本 二.总结 ...
- 使用log4j2分离系统日志与业务日志
前一篇文章介绍了log4j2 扩展日志级别,支持将系统日志与业务处理日志拆分,现在介绍一下通过日志级别将系统日志与业务日志分类,要达到这个目的很容易,只需要配置一下log4j的xml文件: <? ...
- spring JPA写法一种
第一次用,搞了半天,终于知道了大概. 基于ORM的JPA还是蛮好用的, 这次是实现一个MANGODB的日志存储和检索. PRISM用的. repository的写法: package paic.sto ...
- 使用Android Studio开发调用.NET Webservice 之初体验
本人是.NET出身 但苦于领导要让研究Android 外壳然后准备套html5 ,当试验兵真坑啊 但也没办法 咱还得研究啊,索性 不辜负领导的期望(也研究好两三天了)总算弄明白了 app本地存储 和 ...
- haproxy代理kibana、nginx代理kibana并实现登录验证
在使用ELK进行日志统计的时候,由于Kibana自身并没有身份验证的功能,任何人只要知道链接地址就可以正常登录到Kibana控制界面,由于日常的查询,添加和删除日志都是在同一个web中进行,这样就有极 ...
- Sort Transformed Array -- LeetCode
Given a sorted array of integers nums and integer values a, b and c. Apply a function of the form f( ...