Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number data format 1

Status
Not open for further replies.

axmug

Programmer
Oct 13, 2003
34
ES
We have a server running HP-UX and some clients running Windows. We want to run data in an Oracle database and everything is correct except decimal numbers.

In Windows the default separator for decimal numbers is , (we don't have english format) and in the server is . (english format). The problem is the running of data to the server. We want to change the server configuration and have , as default separator.

We have changed the .profile and local variables but it didn't work.

How can we change the default decimal format from . to ,?

Thanks.
 
I think you probably can't if what you're trying to do is change the seperator in a text file. What you could do is use sed/awk/whatever, to replace all , with . in your text file before processing it or whatever. Post back if that sounds reasonable and you need a hand to do it.
 
This is an Oracle problem and it's to do with the NLS_LANG variable (I think)

I'd ask in an Oracle forum I think.

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
I'm always right Ken :) You know that...

(right by accident if I am, the techies don't let me login to production boxes anymore)

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Ken,

The problem isn't the text file. We used vi to modify .profile data.

We think the problem is in the NLS_LANG variable as Mike just said but we don't know where can we find this variable. Anyone knows it?

Thanks.
 
You can, as I remember, change a database from one character set to another. It's a non-trivial process involving down-time.

First step is make sure NLS_LANG is set to the same in the three places it is set.

1 - Database
2 - Application
3 - Terminal


Mike

"Deliver me from that bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
axmug - here's the 9i forum for you forum759

Mike

"Deliver me from that bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
The problem has been solved. It was the NLS_LANG variable. Its format is LANGUAGE_TERRITORY.CHARACTERSET where TERRITORY is where decimal separator is controlled.

Thanks to Mike and Ken for replying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top