SQL Server read text directly
来源:互联网 发布:oracle数据库笔试题 编辑:程序博客网 时间:2024/05/17 01:31
1)OpenRowset, text driver
SELECT *
FROM
OPENROWSET('MSDASQL','Driver={Microsoft Text Driver (*.txt; *.csv)};DEFAULTDIR=C:/;Extensions=CSV;', 'SELECT * FROM test.csv')
/*
content of test.csv:
OrderID,OrderDate,CustID,Amount
0001,2007-01-02,ABC,10000.00
0002,2007-01-03,ABC,12000.00
0003,2007-01-03,JCK,3000.00
0004,2007-01-05,TSH,56000.00
*/
2) OpenRowset, bulk mode
DECLARE @CSVfile VARCHAR(MAX)
SELECT @CSVfile = BulkColumn
FROM OPENROWSET(BULK 'C:/a.txt', SINGLE_BLOB) AS x
SELECT @CSVfile
3) OLE Automation
sp_OACreate 'Scripting.FileSystemObject'
- SQL Server read text directly
- Use the SQL Server CLR to Read and Write Text Files
- sql server varchar and text
- MS Sql Server存储image、text、ntext
- sql server 中text in row
- Sql Server对数据类型text的操作
- Full Text Indexing in SQL Server 2012
- SQL Server, PHP 截断Text 字段
- Inside SQL Server 2005 -- T-SQL Querying read note
- Read text file
- read text file DEMO
- java read write text
- SQL语句 SQL Server中Text类型操作
- C++: read SQL server data using System::Data::SqlClient;
- Never store the password unhased directly on the server!
- [转]Java在SQL Server写入text,ntext,image字段
- SQL Server 2000 到 DB2 数据转换 text 到CLOB
- 在SQL Server中如何用通配符搜索TEXT栏
- 使用GDI+提高gif图片的保存画质
- 推荐一个学习asp.net的好地方
- Java开发工具大全[1]
- Java开发工具大全[2]
- 推荐一个学习Java的好地方
- SQL Server read text directly
- Java开发工具大全[3]
- do not bind 127_0_0_1 in socket server
- Java开发工具大全[4]
- 胡说设计模式
- JTDS连接错误java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.lib
- segmented copy file (for network file transfer resume)
- MyEclipse下设置合适的Content Assist快捷键
- Get datepart