Discover import data from access to sql server, include the articles, news, trends, analysis and practical advice about import data from access to sql server on alibabacloud.com
from your local computer ' s file system then Y OU should use any of the tools discussed in this article. The same article also discusses how to import data to HDFS from SQL Database/sql Server using Sqoop. In this blog I'll elaborate on the same with a example and try to p
In the process of importing data from SQL to oracle, everyone's mindset is to use SQL Server's dtswizard first, because this tool is intuitive and convenient to use, in addition, non-large tables have good performance. I also did this, but after a series of painful operations, I found that there are some important restrictions in the use process.
In the process o
In the implementation of software projects, data import has always been a headache for project personnel. In fact, many methods of batch import data are integrated into SQL Server. Some project implementation consultant headaches,
Database Administrators familiar with SQL server 2000 know that DTS can import and export data. In fact, we can also use Transact-SQL statements to import and export data. In a Transact
Database Administrators familiar with SQLSERVER2000 know that DTS can import and export data. In fact, we can also use Transact-SQL statements to import and export data. In the Transact-SQL statement, we mainly use the OpenDataSou
Label:There are 2 basic scenarios, all without the need to install OfficeOle DB Read + bulkcopyGet Excel Individual SheetName //Connection Stringstringstrconn ="provider=microsoft.jet.oledb.4.0;"+"Data source="+ Path +";"+"Extended Properties=excel 8.0;"; OleDbConnection Conn=NewOleDbConnection (strconn); Conn. Open (); //returns the schema for Excel, including the name, type, creation time, and modification time of each sheet tableDataTable dtsheetna
Database Administrators familiar with SQL Server 2000 know that DTS can import and export data. In fact, we can also use Transact-SQL statements to import and export data. In a Transact
excel|server|sqlserver| Data Writing program, put the appendix of the Excel file (experimental questions Annex 1) class 03 student list. xls
or (appendix 2 of the Experiment) the performance registration form. xls) is imported into the SQL SERVER2000 database.
Requirements:
1. Excel file as data source
2, according to
In a Transact-SQL statement, we mainly use the OpenDataSource function and OPENROWSET function. For more information about functions, see SQL online help. You can easily convert SQL SERVER, ACCESS, and EXCEL data by using the foll
Database Administrators familiar with SQL server 2000 know that DTS can import and export data. In fact, we can also use Transact-SQL statements to import and export data. In a Transact
The following is an example: The code is as follows:Copy code Create table [dbo]. [course] ([Id] [int] NULL,[Name] [nvarchar] (50) NULL,[CourseType] [nvarchar] (50) NULL,[Course] [float] NULL) Import data:Store the following data as a text or SQL file2, Li Gang, Chinese, 89; 3, Li Gang, Mathematics, 79; 3, Li Gang, English, 69; 4, Li Gang, chemistry, 89Impor
Recently, I analyzed the database of a project. to import a large amount of data, I want to import up to 2 million pieces of data to sqlserver at a time. If I use a normal insert statement to write the data, I am afraid that the task cannot be completed without an hour. bcp
insert statements
For syntax of bulk insert, refer to this document. The parameters used here are mainly formatfile, fieldterminator, and rowterminator.
Bulk insert teststock
From 'C: \ sh600475.txt'
With (
Formatfile = 'C: \ bcpformat. xml ',
Fieldterminator = ',',
Rowterminator = '\ r \ n ')
We should also use the firstrow attribute because I want to skip the first two lines of text. After all, the third row is the real data
:\db2.mdb ', ' select * from Serv_user ')
where lock=0
5. Modify Access data:
Update OpenRowSet (' microsoft.jet.oledb.4.0 ', ';d atabase=c:\db2.mdb ', ' select * from Serv_user ')
Set Lock=1
SQL Server and access are roughly that much.
Second,
SQL inert is too slow, and Excel is too slow. I found the BULK INSERT method, which is really too fast. The method for handling millions of rows of data within 10 seconds is as follows:
Alter database Test
Set
Recovery bulk_loggedBulk insert test. DBO. Table1 from
'
D: \ test2.txt
'
With (Datafiletype
=
'
Char
'
,Fieldterminator
=
'
,
'
,Rowterminator
=
'
\ N
-- 1. Use OpenRowSet directly
Create view name
As
Select * From OpenRowSet ('sqlodb', 'Another server name'; 'sa '; 'Password', database name. DBO, table name)
-- 2. Use the linked server-- Create a connection server to access another server in the Enterprise Manager.-- Or
1. SQL Server Import Export Wizard, this is the most convenient way.
Import Wizard, Microsoft provides a variety of data source drivers, including SQL Server Native cliant, OLE DB for
interface is familiar: OK the import is complete.Of course, you can also use File DSN, the connection string into a file, and then import the time to select the file DSN, as long as the path to find the connection string can be, not repeat. After the driver is loaded, you can start to guide the library. I am using the MySQL client tool SQLyog, the installation is very simple, the function interface is muc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.