如何将Excel数据导入Toad 9.5表 [英] How to import excel data into Toad 9.5 table

查看:135
本文介绍了如何将Excel数据导入Toad 9.5表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将Excel数据导入Toad 9.5表

How to import Excel data into Toad 9.5 Table

我有Toad for Oracle 9.5和MS Excel2007.我想使用Toad将Excel数据导入Oracle表.

I have Toad for Oracle 9.5 and MS Excel 2007. I want to import Excel data into Oracle table using Toad.

请让我知道步骤,操作方法.谢谢

Please let me know the steps, how to do that. Thanks

推荐答案

尝试以下方法

方法1:单击工具→导入→导入向导.此窗口可用于将各种源文件中的数据导入表中.

METHOD 1: Click Tools → Import → Import Wizard. This window can be used to import data from various kinds of source files into a table.

方法2: SQL * Loader您可以将TOAD的接口用于Oracle中名为sqlloader的程序.将Excel文件另存为逗号分隔(.csv)或制表符分隔(.txt)文件.如果您的数据在文本字段中包含逗号,请将文件另存为制表符分隔.

METHOD 2: SQL*Loader You can use TOAD's interface to a program from Oracle called sqlloader. Save the Excel file as a comma-delimited (.csv) or tab-delimited (.txt) file. If your data has commas within a text field, save your file as tab-delimited.

打开DBA→Sql Loader向导

Open DBA→Sql Loader Wizard

选择建立新的控制文件".接下来.

Choose "build a new control file". Next.

点击添加".选择您的逗号分隔或制表符分隔的文件.接下来.

Click "Add". Choose your comma-delimited or tab-delimited file. Next.

点击添加".选择你的桌子.

Click "Add". Choose your table.

如果要加载用逗号分隔的文件,请在所有由...分隔的字段"组合框中键入逗号.如果要加载制表符分隔的文件,请从所有由定界符分隔的字段"组合框中选择"TAB".接下来.

If you are loading a comma-delimited file, type a comma in the "all fields delimited by" combo box. If you are loading a tab-delimited file, select "TAB" from the "all fields delimited by" combo box. Next.

选择加载方法",并注意以下几点:

Choose a "load method" noting the following:

TRUNCATE将在加载之前清除表中的所有内容.

TRUNCATE will erase whatever is in the table before loading.

如果表为空,则INSERT将插入数据,但如果表中包含任何数据,则将返回错误.

INSERT will insert data if table is empty but will return an error if table has any data in it.

APPEND将插入数据而不删除任何现有数据.您可能会以这种方式获得重复,但是如果您试图获取由于某种原因而被割断的最后一行,这是一个好方法.

APPEND will insert data without deleting any existing data. You might get duplicates this way but it's a good method if you're trying to get that last line that somehow got munged for some reason or another.

如果文件的第一行中有列标题,请在跳过框中键入1.接下来.

If your file has column headers in its first row, type a 1 in the skip box. Next.

在控制文件名框中键入一个控制文件名.接下来.

Type a control file name in the control file name box. Next.

选择立即执行"以立即加载数据,或选择仅构建控制文件"以构建.ctl文件.理论上,一旦有了ctl文件,您甚至都不需要TOAD,因为您可以在具有sqlloader并可以连接到数据库的任何计算机上使用sqlloader.但是你为什么要. :)我选择立即执行.

Choose either "execute now" to load the data now or "just build the control file" to build the .ctl file. Once you have the ctl file theoretically you don't even need TOAD, as you could just use sqlloader on any machine that has sqlloader and can connect to the database. But why would you want to. :) I choose execute now.

注意:如果在Windows 2000或更高版本的操作系统上使用Oracle 8.0或更早版本,请取消选中监视进度"

Note: If you are working with Oracle 8.0 or earlier on a Windows 2000 or later OS, uncheck "Watch Progress"

注意:拥有ctl文件后,您可以:

Note: once you have a ctl file you can:

选择DBA→Sql Loader向导

Choose DBA→Sql Loader Wizard

选择使用控制文件".接下来.

Choose "Use control file". Next.

选择您的控制文件.接下来.

Select your control file. Next.

选择立即执行".完成.

Choose "execute now". Finish.

这篇关于如何将Excel数据导入Toad 9.5表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆