dbTalk Databases Forums  

handling special characters in sqlldr

comp.databases.oracle.server comp.databases.oracle.server


Discuss handling special characters in sqlldr in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dmardkar
 
Posts: n/a

Default handling special characters in sqlldr - 09-09-2010 , 11:11 AM






Hi,

I am trying to load a record(s) in a table which contains a field of
text datatype. The records in question contain occasional single
qoutes. This is an example of such records:

en|PRD-SHPE|11.0|NOTE: If a slab is a dummy', an asterisk is
displayed at the end of the|20011003.0|


I am then creating a control file and use sqlldr to load the data but
the load fails with the following messege:


Record 1: Rejected - Error on table SCRHLP_REC, column HLP_TXT.
ORA-12899: value too large for column
"RPSNX31"."SCRHLP_REC"."HLP_TXT" (actual: 75, maximum: 74)


Here is the control file I am using:


load data
infile "./scrhlp.dat" "str X'400A'"
badfile "./scrhlp.bad"
into table scrhlp_rec
fields terminated by "|"
(
HLP_LNG_CD ,
HLP_FLD_NM ,
HLP_LN_NO ,
HLP_TXT ,
HLP_REF_DT
)



If I remove the single qoute in the data, all works fine. How do I
specify that a single qoute is acceptable in this case? Please help.

Thanks.

Reply With Quote
  #2  
Old   
shakespeare
 
Posts: n/a

Default Re: handling special characters in sqlldr - 09-09-2010 , 04:11 PM






Op 9-9-2010 18:11, dmardkar schreef:
Quote:
Hi,

I am trying to load a record(s) in a table which contains a field of
text datatype. The records in question contain occasional single
qoutes. This is an example of such records:

en|PRD-SHPE|11.0|NOTE: If a slab is a dummy', an asterisk is
displayed at the end of the|20011003.0|


I am then creating a control file and use sqlldr to load the data but
the load fails with the following messege:


Record 1: Rejected - Error on table SCRHLP_REC, column HLP_TXT.
ORA-12899: value too large for column
"RPSNX31"."SCRHLP_REC"."HLP_TXT" (actual: 75, maximum: 74)


Here is the control file I am using:


load data
infile "./scrhlp.dat" "str X'400A'"
badfile "./scrhlp.bad"
into table scrhlp_rec
fields terminated by "|"
(
HLP_LNG_CD ,
HLP_FLD_NM ,
HLP_LN_NO ,
HLP_TXT ,
HLP_REF_DT
)



If I remove the single qoute in the data, all works fine. How do I
specify that a single qoute is acceptable in this case? Please help.

Thanks.
Make the column some chars longer.

Shakespeare

Reply With Quote
  #3  
Old   
ddf
 
Posts: n/a

Default Re: handling special characters in sqlldr - 09-09-2010 , 04:13 PM



On Sep 9, 12:11*pm, dmardkar <dmard... (AT) gmail (DOT) com> wrote:
Quote:
Hi,

I am trying to load a record(s) in a table which contains a field of
text datatype. The records in question contain occasional single
qoutes. This is an example of such records:

en|PRD-SHPE|11.0|NOTE: *If a slab is a dummy', an asterisk is
displayed at the end of the|20011003.0|

I am then creating a control file and use sqlldr to load the data but
the load fails with the following messege:

Record 1: Rejected - Error on table SCRHLP_REC, column HLP_TXT.
ORA-12899: value too large for column
"RPSNX31"."SCRHLP_REC"."HLP_TXT" (actual: 75, maximum: 74)

Here is the control file I am using:

load data
infile "./scrhlp.dat" "str X'400A'"
badfile "./scrhlp.bad"
into table scrhlp_rec
fields terminated by "|"
(
HLP_LNG_CD * * * * ,
HLP_FLD_NM * * * * ,
HLP_LN_NO * * * * *,
HLP_TXT ,
HLP_REF_DT
)

If I remove the single qoute in the data, all works fine. How do I
specify that a single qoute is acceptable in this case? Please help.

Thanks.
I have no problems loadng data with a single-quote inline; are your
text strings enclosed with ' or "? Using " my loads succeed.
Possibly you should change the enclosing quotation character for your
string data.


David Fitzjarrell

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.