dbTalk Databases Forums  

Issues while storing a long dash in oracle

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Issues while storing a long dash in oracle in the comp.databases.oracle.misc forum.



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

Default Issues while storing a long dash in oracle - 03-11-2008 , 12:53 AM






Hi,

I work on an Oracle9 database which is loaded through sqlldr. The
issue that I am facing is because of a special character known as long
dash "-" (the normal one is "-") which appears in the flat file used
to load the database. Whenver such character appears in the file the
database processes it and it appears as "¿" in the database. So the
data coming as "Finance - Fulfillment Factory" in the flat file is
stored as "Finance ¿ Fulfillment Factory" in the database.
The main reason for me posting this issue is because when I format
this data according to the needs of my application it gives me the
wrong result. I use a command like below:

nvl(rpad(UPPER(substr(nvl( substr(column1,1,instr(column1,'(')-1),column1),
1,24)),24),' ')

This command is supposed to return me 24 characters in all situations
but it fails when the data contains that character "¿". It returns
only 23 characters in this situation. I guess that is because that
character takes 2 bytes instead of normal 1 and the rpad pads the data
with 24 bytes and not 24 characters. So since this character takes 2
bytes it returns only 23 characters.
I have also checked and the database uses the UTF8 character set.

Not sure how to solve this issue...any help would be much appreciated.

Thanks!

Reply With Quote
  #2  
Old   
Thomas Kellerer
 
Posts: n/a

Default Re: Issues while storing a long dash in oracle - 03-11-2008 , 01:31 AM






Sandy80, 11.03.2008 07:53:
Quote:
Hi,

I work on an Oracle9 database which is loaded through sqlldr. The
issue that I am facing is because of a special character known as long
dash "-" (the normal one is "-") which appears in the flat file used
to load the database. Whenver such character appears in the file the
database processes it and it appears as "¿" in the database. So the
data coming as "Finance - Fulfillment Factory" in the flat file is
stored as "Finance ¿ Fulfillment Factory" in the database.
The main reason for me posting this issue is because when I format
this data according to the needs of my application it gives me the
wrong result. I use a command like below:

I have also checked and the database uses the UTF8 character set.
Is your input file UTF8? If yes, did you tell sqlldr that your input file is UTF8?

Thomas




Reply With Quote
  #3  
Old   
Thomas Kellerer
 
Posts: n/a

Default Re: Issues while storing a long dash in oracle - 03-11-2008 , 01:31 AM



Sandy80, 11.03.2008 07:53:
Quote:
Hi,

I work on an Oracle9 database which is loaded through sqlldr. The
issue that I am facing is because of a special character known as long
dash "-" (the normal one is "-") which appears in the flat file used
to load the database. Whenver such character appears in the file the
database processes it and it appears as "¿" in the database. So the
data coming as "Finance - Fulfillment Factory" in the flat file is
stored as "Finance ¿ Fulfillment Factory" in the database.
The main reason for me posting this issue is because when I format
this data according to the needs of my application it gives me the
wrong result. I use a command like below:

I have also checked and the database uses the UTF8 character set.
Is your input file UTF8? If yes, did you tell sqlldr that your input file is UTF8?

Thomas




Reply With Quote
  #4  
Old   
Thomas Kellerer
 
Posts: n/a

Default Re: Issues while storing a long dash in oracle - 03-11-2008 , 01:31 AM



Sandy80, 11.03.2008 07:53:
Quote:
Hi,

I work on an Oracle9 database which is loaded through sqlldr. The
issue that I am facing is because of a special character known as long
dash "-" (the normal one is "-") which appears in the flat file used
to load the database. Whenver such character appears in the file the
database processes it and it appears as "¿" in the database. So the
data coming as "Finance - Fulfillment Factory" in the flat file is
stored as "Finance ¿ Fulfillment Factory" in the database.
The main reason for me posting this issue is because when I format
this data according to the needs of my application it gives me the
wrong result. I use a command like below:

I have also checked and the database uses the UTF8 character set.
Is your input file UTF8? If yes, did you tell sqlldr that your input file is UTF8?

Thomas




Reply With Quote
  #5  
Old   
Thomas Kellerer
 
Posts: n/a

Default Re: Issues while storing a long dash in oracle - 03-11-2008 , 01:31 AM



Sandy80, 11.03.2008 07:53:
Quote:
Hi,

I work on an Oracle9 database which is loaded through sqlldr. The
issue that I am facing is because of a special character known as long
dash "-" (the normal one is "-") which appears in the flat file used
to load the database. Whenver such character appears in the file the
database processes it and it appears as "¿" in the database. So the
data coming as "Finance - Fulfillment Factory" in the flat file is
stored as "Finance ¿ Fulfillment Factory" in the database.
The main reason for me posting this issue is because when I format
this data according to the needs of my application it gives me the
wrong result. I use a command like below:

I have also checked and the database uses the UTF8 character set.
Is your input file UTF8? If yes, did you tell sqlldr that your input file is UTF8?

Thomas




Reply With Quote
  #6  
Old   
Sandy80
 
Posts: n/a

Default Re: Issues while storing a long dash in oracle - 03-11-2008 , 01:36 AM



Quote:
I have also checked and the database uses the UTF8 character set.

Is your input file UTF8? If yes, did you tell sqlldr that your input file is UTF8?

Thomas
Not sure whether the input file is UTF8 or not but yes the sqlldr does
have the setting to know that the input file would be UTF8.


Reply With Quote
  #7  
Old   
Sandy80
 
Posts: n/a

Default Re: Issues while storing a long dash in oracle - 03-11-2008 , 01:36 AM



Quote:
I have also checked and the database uses the UTF8 character set.

Is your input file UTF8? If yes, did you tell sqlldr that your input file is UTF8?

Thomas
Not sure whether the input file is UTF8 or not but yes the sqlldr does
have the setting to know that the input file would be UTF8.


Reply With Quote
  #8  
Old   
Sandy80
 
Posts: n/a

Default Re: Issues while storing a long dash in oracle - 03-11-2008 , 01:36 AM



Quote:
I have also checked and the database uses the UTF8 character set.

Is your input file UTF8? If yes, did you tell sqlldr that your input file is UTF8?

Thomas
Not sure whether the input file is UTF8 or not but yes the sqlldr does
have the setting to know that the input file would be UTF8.


Reply With Quote
  #9  
Old   
Sandy80
 
Posts: n/a

Default Re: Issues while storing a long dash in oracle - 03-11-2008 , 01:36 AM



Quote:
I have also checked and the database uses the UTF8 character set.

Is your input file UTF8? If yes, did you tell sqlldr that your input file is UTF8?

Thomas
Not sure whether the input file is UTF8 or not but yes the sqlldr does
have the setting to know that the input file would be UTF8.


Reply With Quote
  #10  
Old   
Thomas Kellerer
 
Posts: n/a

Default Re: Issues while storing a long dash in oracle - 03-11-2008 , 01:49 AM



Sandy80, 11.03.2008 08:36:
Quote:
I have also checked and the database uses the UTF8 character set.

Is your input file UTF8? If yes, did you tell sqlldr that your input file is UTF8?

Not sure whether the input file is UTF8 or not but yes the sqlldr does
have the setting to know that the input file would be UTF8.
That sounds like the /input file/ is not UTF8


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 - 2012, Jelsoft Enterprises Ltd.