Home » SQL & PL/SQL » SQL & PL/SQL » Removing ',' in values?
Removing ',' in values? [message #334412] Wed, 16 July 2008 07:21 Go to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member
Hi,

In My database i have year colummn.It showing values like
2,006
2,007
2,008....
But i want to remove ',' in year.How can i remove that one.Can any one help me.
Re: Removing ',' in values? [message #334414 is a reply to message #334412] Wed, 16 July 2008 07:22 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
search for the REPLACE function.

But once again, we say that you have a poor poor database design with storing NUMBERs and DATEs in a VARCHAR2 column. Your headaches will never end.

[Updated on: Wed, 16 July 2008 07:25]

Report message to a moderator

Re: Removing ',' in values? [message #334418 is a reply to message #334412] Wed, 16 July 2008 07:31 Go to previous messageGo to next message
jyothsna1612
Messages: 68
Registered: June 2008
Member
Ex:
SQL> select replace('2,006',',','') from dual;

REPL
----
2006


Thanks
Re: Removing ',' in values? [message #334421 is a reply to message #334412] Wed, 16 July 2008 07:38 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
tondapi wrote on Wed, 16 July 2008 14:21
Hi,

In My database i have year colummn.It showing values like
2,006
2,007
2,008....
But i want to remove ',' in year.How can i remove that one.Can any one help me.

Are you sure?
Are those stored in varchar2 columns or do you just use some default formatting on output of numbers?
do a DESC on that table to see what the datatype of the column is.
Previous Topic: Need Help in adding photo
Next Topic: script to delete all objets of schema
Goto Forum:
  


Current Time: Tue Feb 11 16:57:55 CST 2025