Replace Only Third Character with *

How to replace only third character of employees name with * from employee table?

Showing Answers 1 - 7 of 7 Answers

Megha Potdar

  • Jun 26th, 2015
 

Code
  1.  

  2. SELECT ENAME,SUBSTR(ENAME,1,2)||*||SUBSTR(ENAME,4,LENGTH(ENAME)) FROM EMP;

  Was this answer useful?  Yes

karthika

  • Jun 29th, 2015
 

SELECT :ENAME,SUBSTR(:ENAME,1,2)||*||SUBSTR(:ENAME,4,LENGTH(:ENAME)) FROM dual;
The above answer is correct only. but * should be in single quotes.

  Was this answer useful?  Yes

  • Dec 10th, 2017
 

Select replace(ename, substr(ename, 3,3),*) from employees;

  Was this answer useful?  Yes

Asish

  • Jan 7th, 2018
 

substr(fn, 1,2) || * || substr(fn,4)

  Was this answer useful?  Yes

PAVAN

  • Jan 19th, 2018
 

SELECT REGEXP_REPLACE(FIRSTNAME, SUBSTR(FIRSTNAME,3,1), *,1,1) FROM EMPLOYEE;

  Was this answer useful?  Yes

Ankit

  • Mar 7th, 2018
 

SELECT REPLACE(NAME,SUBSTR(NAME,3,1),*) FROM Friend_Birthday

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions