Home » SQL & PL/SQL » SQL & PL/SQL » Update statement - How do i remove "-" from field
Update statement - How do i remove "-" from field [message #229448] Sun, 08 April 2007 02:16 Go to next message
milford_f
Messages: 18
Registered: July 2006
Junior Member
Hello Everybody.....Happy Easter.

I have a database witch has a - (hyphen) in the item code field,
example 7122-0038, 72-4800. However the correct item code is without the - (hyphen), i.e. 71220038,724800. How do i write an update statment to remove the - (hyphen).

Thanks in advance.

Cheers,
Milford.
Re: Update statement - How do i remove "-" from field [message #229449 is a reply to message #229448] Sun, 08 April 2007 02:18 Go to previous messageGo to next message
Michel Cadot
Messages: 65153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

replace(mycol,'-','')

Regards
Michel
Re: Update statement - How do i remove "-" from field [message #229462 is a reply to message #229448] Sun, 08 April 2007 08:35 Go to previous message
milford_f
Messages: 18
Registered: July 2006
Junior Member
Thanks Michel

It works,

Cheers,
Milford.
Previous Topic: Help on questions faced at interview
Next Topic: How to calculate time difference if not using date datatype
Goto Forum:
  


Current Time: Tue Aug 22 21:34:30 CDT 2017

Total time taken to generate the page: 0.01780 seconds