Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

conditional loading using sql loader

418432Aug 17 2005 — edited Aug 17 2005
Hi All,
We are trying to load certain data into oracle tables using sql loader. The filter condition is based on first character of 7th field in the record.
Ideally the control file should contain lines such as

------------start of control file ----------

LOAD DATA
truncate
DISCARDMAX 9999999
INTO table email_rep_correct
when substr(messageid,1,1)='<'
FIELDS TERMINATed by whitespace
trailing nullcols
(tdate date,
ttime char,
channel_name1 position(25:37) CHAR NULLIF channel_name1 =BLANKS,
channel_name2 position(38:49) CHAR NULLIF channel_name2 =BLANKS,
transtype char,
tsize integer external(8),
sender char,
orig_recipient char,
curr_recipient char,
messageid char
)

------------End of control file ----------

However the function substr in the when clause does not seem to work. is there any restriction on using function while loading using sql loader. Is there any workaround to the same.

Many thanks in advance
REgards
Yogesh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2005
Added on Aug 17 2005
1 comment
1,086 views