將excel中資料從window上匯入到linux中oracle資料庫
說明:伺服器作業系統環境linux,資料庫oracle 10g,excel表在windows上
方案如下:
1、
先將abc.xls另存為abc.csv
先將abc.xls另存為abc.csv
2、
在scott使用者下建立一張表,這張表的欄位與abc.xls中的欄位一致。
create table zsx
(id number,
name varchar2(10)
);
3、
將abc.csv檔案中的欄位去掉,就是不是資料的第一行。
4、
然後在linux中建立一個insert.ctl檔案,注意用oracle使用者建立
$ vi insert.ctl (這個檔案在/home/oracle下可以找到)
5、
在insert.ctl檔案中編寫以下語句
load data
infile abc.csv
into table zsx
fields terminated by ','
(id,name)
6、
將windows上的abc.csv檔案傳到linux中,放在/home/oracle下。
7、
改變檔案abc.csv許可權及所屬組(用root使用者做)
# chown -R oracle:oinstall /home/oracle/abc.csv
8、
使用以下語句匯入:
$ sqlldr scott/tiger control=insert.ctl
9、
匯入成功後查詢結果:
select * from zsx;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29107230/viewspace-769368/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 將資料庫中資料匯出為excel表格資料庫Excel
- pl/sql developer將excel資料匯入到資料庫中SQLDeveloperExcel資料庫
- java 從EXCEL匯入到資料庫JavaExcel資料庫
- 從Excel到匯入MYSQL資料庫ExcelMySql資料庫
- 將資料庫中資料匯入至solr索引庫資料庫Solr索引
- 將excel表格匯入資料庫Excel資料庫
- Oracle 巧用外部表將大量excel資料匯入資料庫OracleExcel資料庫
- 將oracle中資料轉存到excel中OracleExcel
- 匯入excel資源到資料庫Excel資料庫
- 將MYSQL中資料匯出到EXCEL表MySqlExcel
- 如何用Java將excel資料匯入資料庫JavaExcel資料庫
- GeoRapter工具將shapefile資料匯入到Oracle空間資料庫中APTOracle資料庫
- xml與資料庫中資料的匯入匯出XML資料庫
- java 實現excel中的資料匯入到資料庫的功能JavaExcel資料庫
- java怎麼將excel表格資料匯入資料庫JavaExcel資料庫
- Oracle 資料匯入ExcelOracleExcel
- 將資料從文字匯入到mysql(轉)MySql
- .NET Core使用NPOI將Excel中的資料批量匯入到MySQLExcelMySql
- 將informix匯出的文字資料匯入oracle資料庫ORMOracle資料庫
- excel 匯入sqlyog資料庫ExcelSQL資料庫
- 如何將資料匯入到 SQL Server Compact Edition 資料庫中SQLServer資料庫
- 把csv檔案的資料匯入到oracle資料庫中Oracle資料庫
- Excel的資料匯入到PB的DW中Excel
- excel檔案中的資料匯入Oracle資料庫的幾種方法ExcelOracle資料庫
- Oracle工具之sqlldr的使用--如何將文字檔案或Excel中的資料匯入資料庫OracleSQLExcel資料庫
- Sql Server資料庫資料匯入到SQLite資料庫中Server資料庫SQLite
- python將目標檢測資料匯入到指定資料庫中Python資料庫
- TP5.1excel匯入資料庫的程式碼?php excel如何匯入資料庫?Excel資料庫PHP
- 將Excel中的資料匯入至MsSQLSERVER中(示例) (轉)ExcelSQLServer
- 如何將外部資料庫 匯入到系統的SQL中資料庫SQL
- Oracle匯入excel資料快速方法OracleExcel
- asp.net 操作Excel表資料匯入到SQL Server資料庫ASP.NETExcelSQLServer資料庫
- 把Excel表資料匯入到mysqlExcelMySql
- 如何將 EXCEL 資料寫入資料庫Excel資料庫
- 轉載:利用SQL*Loader將 Excel 資料匯出到資料庫中SQLExcel資料庫
- Sqoop將MySQL資料匯入到hive中OOPMySqlHive
- 將XML匯入資料庫XML資料庫
- Oracle資料匯入到Hive資料庫的操作方法OracleHive資料庫