Home » SQL & PL/SQL » SQL & PL/SQL » Multi Byte conversion (Oracle 11g)
Multi Byte conversion [message #556370] Sat, 02 June 2012 21:07 Go to next message
cbaskar99
Messages: 2
Registered: June 2012
Location: Chennai
Junior Member
Hi,
My application spools the data from database into file and file is fixed length. My application working fine when database has single byte characters. But I am getting fields postion misposition and length mismatch in spooled line when data base has Multi byte characters(ê).

Can you pls. help me to fix the issue. I want to convert the multi byte characters into single byte while spooling the data( ê ==> e)

The below query has converted the multi byte to single byte character. But actual value is modified into lower case. Pls. help me to resolve this issue or suggest me the appropriate function.


####################################################
select utl_raw.cast_to_varchar2((nlssort(c.Name,'nls_sort=binary_ai'))) sbyte, '|'
c.Name
from EMP c


viva! experiencias | Viva! Experiências

####################################################

Regards,
C. Baskar
Re: Multi Byte conversion [message #556371 is a reply to message #556370] Sat, 02 June 2012 22:27 Go to previous messageGo to next message
BlackSwan
Messages: 20086
Registered: January 2009
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/

I would expect TRANSLATE() function to do what is necessary,
but it may not be the most efficient solution.

http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions216.htm#sthref1705
Re: Multi Byte conversion [message #556380 is a reply to message #556371] Sun, 03 June 2012 15:17 Go to previous message
cbaskar99
Messages: 2
Registered: June 2012
Location: Chennai
Junior Member

Thanks for your guidelines and it's really very useful for me. Let me follow the same from my postings.
Previous Topic: Function question
Next Topic: ORA-01427: single-row subquery returns more than one row
Goto Forum:
  


Current Time: Sun May 19 12:01:34 CDT 2013

Total time taken to generate the page: 0.08855 seconds