When clause SQL Loader [message #185776] |
Thu, 03 August 2006 09:51 |
superoscarin@hotmail.com
Messages: 101 Registered: July 2006 Location: Mexico
|
Senior Member |
|
|
I'm trying to use WHEN clause in a control file, I'm following the documentation but it doesn't work still.
This is my control file:
LOAD DATA
CHARACTERSET UTF8
INTO TABLE DM08_CONDICIONADA
WHEN (STATUS_DESC='A')
APPEND
REENABLE DISABLED_CONSTRAINTS
FIELDS
TERMINATED BY '|'
(
"ID_COND" POSITION (1) INTEGER EXTERNAL ,
"DESC_COND" CHAR,
"STATUS_DESC" CHAR
)
I have the follow error:
SQL*Loader-350: Syntax error at line 26.
Expecting "(", found keyword append.
APPEND
^
I have tried with
WHEN STATUS_DESC='A'
but the error is the same. Do you have any ideas why is that?? I'm working with oracle 9i.
´m using the documentation...
-->full_fieldname or pos_spec-->operator--> char_string or Blanks --->
but it doesn't tell me where the when clause goes... i'm probing too with the forum information but i don't know what happens
I'm desperate
|
|
|
|
|
|
|
|
|
Re: When clause SQL Loader [message #185852 is a reply to message #185848] |
Thu, 03 August 2006 17:39 |
|
ebrian
Messages: 2794 Registered: April 2006
|
Senior Member |
|
|
Well it appears that the WHEN clause needs to match the column name listed in the control file EXACTLY. For example, the following will also work with quotes:
options (direct=true)
LOAD DATA
CHARACTERSET UTF8
APPEND
INTO TABLE DM08_CONDICIONADA
REENABLE DISABLED_CONSTRAINTS
WHEN "STATUS_DESC"='A'
FIELDS TERMINATED BY '|'
(
"ID_CON" POSITION (1) INTEGER EXTERNAL ,
"DESC_COND" CHAR,
"STATUS_DESC" CHAR
)
[Updated on: Fri, 04 August 2006 08:16] Report message to a moderator
|
|
|
|