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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace first character in a string using an expression 1

Status
Not open for further replies.

kernal

Technical User
Feb 27, 2001
415
US
How can I replace the first character in a string using an expression? Example:

00000

Results wanted (wanting the first character to be an X):

X0000

Help is appreciated.
 
Code:
select 'X'||substr('00000',2) result from dual;

RESUL
-----
X0000
Let us know if this resolves your need.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Worked wonderfully. Thanks Dave.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top