This procedure shows how to test importing sample data
from a spreadsheet into HCL Informix®.
Files containing comma-separated values (CSV) are a commonly
used for transferring simple text data between programs. The CSV format
uses a comma as a field separator and a new line as a record separator.
Double quotation marks are used to embed commas, new lines, or double
quotation marks within strings. Some applications (for example, some
spreadsheet applications) provide the option of exporting text data
in the CSV format.
To test importing a CSV file:
- Create a test database and simple table in Informix.
- In your spreadsheet application:
- Create a spreadsheet with columns that correspond to
the columns in your Informix table.
- Populate the columns with some test data.
- Export the data by saving it in .csv format.
- Copy the resulting .csv file and paste
it in a location that you can access from ipload.
- Start ipload and choose to create a job.
- In the Generate Job window:
- Select Load/Unload Job in the Generate group.
- Select Delimited in the Format
Type group.
- Specify the .csv file as the source
for input to the new job you are creating. Specify a name in the Generate
Name field, select your database in the Database field,
select you table in the Table field, and then
insert the full path to the
.csv file in the Device field.
- Click OK.
- Load the job by choosing .
- While you can do many things (such as filtering and mapping)
on the Load Job window, for this test, select
the Format button.
The Delimited
Format window appears. You use this window to define the
format of the input file.
- In the Delimited Format window, click
the Options button to display the Delimited
Options window.
- In the Delimiter Options window, change
the value in the Field Separator field to , (a
comma) and click OK.
The ipload utility
returns you to the Delimited Format window.
- In the Delimited Format window, click OK.
The ipload utility returns you to the Load
Job window.
- Click Run to run the job.
The ipload utility
displays status information while the job runs, and then it displays
the results of the job.
- Click OK twice to return to the
main ipload window.