Home » SQL & PL/SQL » SQL & PL/SQL » how to create file with spanish characters using SPOOL (Oracle 10.2.0.1.0)
icon4.gif  how to create file with spanish characters using SPOOL [message #341406] Mon, 18 August 2008 15:56 Go to next message
SaqibHMalik
Messages: 3
Registered: August 2008
Junior Member
Hi
I have data in the database which contains Spanish characters like Pequeita. I have made Spanish character bold to distinguish it from other characters.

now my problem is that I want to create a CSV file using spool in SQL PLUS but I am not able to generate exact data. The data in csv file is coming Pequeita as Pequeita.

I will be highly appreciated for any help.
Please let me know if you have any questions.
Regards

SM
Re: how to create file with spanish characters using SPOOL [message #341407 is a reply to message #341406] Mon, 18 August 2008 16:03 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
What you see may not be what you have.
What utility did you use to inspect the contents & decide it was not as expected?
Are you 100% positive you have a utility which accurately displays non-ASCII characters outside the database?
Re: how to create file with spanish characters using SPOOL [message #341408 is a reply to message #341407] Mon, 18 August 2008 16:31 Go to previous messageGo to next message
SaqibHMalik
Messages: 3
Registered: August 2008
Junior Member
Thanks for your comments.
I can see data using TOAD. If I export from TOAD it is fine. But on same machine if I use sqlplus i get the result I mentioned. And if I use sqlplusw then i get different result which is also not correct. I want to automat this process that’s why I want to use sqlplus.
Re: how to create file with spanish characters using SPOOL [message #341409 is a reply to message #341406] Mon, 18 August 2008 16:45 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above

Do NOT describe/explain what you are doing.
use CUT & PASTE along with <code tags. documented in URL above to show us exactly what is or is not happening.

If sqlplus does not display the desired/expected results, then it possible is NLS is not correct.
Re: how to create file with spanish characters using SPOOL [message #341410 is a reply to message #341409] Mon, 18 August 2008 17:00 Go to previous messageGo to next message
SaqibHMalik
Messages: 3
Registered: August 2008
Junior Member
current NLS paramters are like this

SQL> SELECT * FROM V$NLS_PARAMETERS;

NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_CHARACTERSET WE8ISO8859P1
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE

Re: how to create file with spanish characters using SPOOL [message #341468 is a reply to message #341406] Mon, 18 August 2008 23:47 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It is just a matter of character set, your client OS, your client configuration (NLS_LANG), your client program, your database one, just check which one does not support spanish character.

Regards
Michel
Previous Topic: can i open a file through plsql
Next Topic: IF condition on PLSQL
Goto Forum:
  


Current Time: Sat Dec 03 10:14:17 CST 2016

Total time taken to generate the page: 0.04725 seconds