HomeOracle Page 2 - Importing a CSV Text File into Oracle 10G XE
Exporting the Employees table from MS Access - Oracle
If you need to deal with legacy data by moving it to more recent databases, this article might help. It will show you how to move data from an MS Excel file into an Oracle 10G XE table.
Click on the File menu and in the drop-down, click on Export... which opens the window Export Table 'Employees' To.... Click on the drop-down for Save As type: Text Files(*.txt;*.CSV;*.tab;*.asc) and then click on the button Export. You will have to type in the extension type from among the four choices shown; the default is *.txt. Again by default the file will be saved to the My Documents folder as shown.
When the button Export All, which gets enabled, is clicked, the Export Text Wizard comes up as shown. It is already showing that a delimited character will separate the fields. Fixed width will be another option for the export process, if that restriction is acceptable. It also shows a sample of how the export looks, showing the columns.
When you click on the Next button in the above screen you will shift to the next screen shown here, which comes up with the default choice selecting comma as the delimiter between the fields. Since column names are important for the table that will be created in Oracle 10G XE, make sure you place a check mark on the check box marked Include Field Names for First Row. Click on the Next button. The choice of what Text Qualifier to use is also important as discussed later.
This brings you to the final screen showing that the EmployeesCsv.CSV file will be saved to the location shown in the Export to File: textbox.
When you click on the Finish button, you get the final screen showing where you can find your file.
The next picture shows a part of the exported EmployeesCsv.csv file opened using Notepad. Notice that all fields are enclosed in double quotes. The very first line has the names of the column. Also note the column values for the 'Photo' column are all empty. The picture shows text corresponding to only two rows in the original table. It will be useful to open this file using MS Excel to verify that the table is faithfully reproduced in the CSV file.