oracle 如何将excel数据导入Toad 9.5表格

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22207895/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 05:32:07  来源:igfitidea点击:

How to import excel data into Toad 9.5 table

oracletoad

提问by Qasim0788

How to import Excel data into Toad 9.5 Table

如何将 Excel 数据导入 Toad 9.5 表格

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

我有 Toad for Oracle 9.5 和 MS Excel 2007。我想使用 Toad 将 Excel 数据导入到 Oracle 表中。

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

请让我知道步骤,如何做到这一点。谢谢

回答by Smart003

try the following methods

试试下面的方法

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

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

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.

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

Open DBA→Sql Loader Wizard

打开 DBA→Sql Loader 向导

Choose "build a new control file". Next.

选择“构建新的控制文件”。下一个。

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

单击“添加”。选择逗号分隔或制表符分隔的文件。下一个。

Click "Add". Choose your table.

单击“添加”。选择你的桌子。

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 will erase whatever is in the table before loading.

TRUNCATE 将在加载之前擦除表中的任何内容。

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

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

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.

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

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

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

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

在控制文件名框中键入控制文件名。下一个。

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.

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

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

注意:如果您在 Windows 2000 或更高版本的操作系统上使用 Oracle 8.0 或更早版本,请取消选中“Watch Progress”

Note: once you have a ctl file you can:

注意:一旦你有了一个 ctl 文件,你就可以:

Choose DBA→Sql Loader Wizard

选择 DBA→Sql Loader Wizard

Choose "Use control file". Next.

选择“使用控制文件”。下一个。

Select your control file. Next.

选择您的控制文件。下一个。

Choose "execute now". Finish.

选择“立即执行”。结束。

回答by user3385666

Menu Database then Import and Import Table data.

菜单数据库然后导入和导入表数据。

You have to select the table where are you going to import and then, the more easy way, import from Clipboard (so before proceed to import just ctrl+c your cells in excel).

您必须选择要导入的表格,然后更简单的方法是从剪贴板导入(因此在继续导入之前,只需按 ctrl+c 在 excel 中导入您的单元格)。

Usually I copy also the header row, it helps me in checking if columns are matched well.

通常我也会复制标题行,它可以帮助我检查列是否匹配良好。