Pmchapter loading delimited datafields terminated feature char
|
|||
---|---|---|---|
112 |
Note the FIELDS keyword that precedes the TERMINATED BY clause. That needs to be there when you specify the termination character globally, for all fields.
You can actually mix the two methods. You can specify one delimiter globally, and then override it for specific fields. Consider the following data:
|
||
---|---|---|
|
||
Example: Multi-character delimiters
Previous examples have all illustrated single-character delimiters, but SQL*Loader also allows you to specify delimiters of any arbitrary length. The following data uses two characters—a double asterisk (**)—between each field:
This is the Title of the Book, eMatter Edition | ||
---|---|---|
Copyright © 2001 O’Reilly & Associates, Inc. All rights reserved. | ||
|
113 | ||
---|---|---|---|
|
|||
|
|||
The ENCLOSED BY clause allows you to specify enclosure characters for a field. The clause may immediately follow the TERMINATED BY clause, or it may replace that clause altogether. Following is the syntax:
[OPTIONALLY] ENCLOSED [BY] {'string' | X'hex_digits'}
[AND {'string' | X'hex_digits'}]
This is the Title of the Book, eMatter Edition | ||
---|---|---|
Copyright © 2001 O’Reilly & Associates, Inc. All rights reserved. | ||