SQLLDR: Delimiter included in textfield [message #110057] |
Thu, 03 March 2005 03:15 |
horizon
Messages: 4 Registered: March 2005
|
Junior Member |
|
|
Hello,
is there a way to "escape" the field delimiter character within the fields that it is not interpreted as the field delimiter?
Example:
Delimiter: '|'
Text: Field1|Field2 constaining | within| Field3|<endrec>
|
|
|
|
|
|
|
|
Re: SQLLDR: Delimiter included in textfield [message #110303 is a reply to message #110209] |
Sat, 05 March 2005 04:39 |
Frank Naude
Messages: 4587 Registered: April 1998
|
Senior Member |
|
|
What do you mean the problem is shifted? Can't you just test it?
SQL> CREATE TABLE test (f1 varchar2(30), f2 varchar2(30), f3 varchar2(30));
Table created.
$ cat test.ctl
load data
infile *
into table test
fields terminated by "|" optionally enclosed by '"'
(f1, f2, f3)
begindata
Field1|"Field2 containing | within"|Field3|
$ sqlldr scott/tiger control=test.ctl
SQL*Loader: Release 10.1.0.2.0 - Production on Sat Mar 5 12:08:43 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Commit point reached - logical record count 1
SQL> SELECT * FROM test;
F1 F2 F3
------------------------------ ------------------------------ ------------------------------
Field1 Field2 containing | within Field3
Best regards.
Frank
|
|
|