Skip to content
Advertisement

How to replace all the dots before @ in an email with empty string in Oracle SQL?

I want to replace all the dots before @ in an email with empty string in oracle query

like:

Advertisement

Answer

  • Instr – To identify the position(@)
  • Substr – To extract data between start(1) and end(@) position
  • Replace – To replace . with ''
  • || – To concatenate two strings

Try this

Result:

SqlFiddle Demo

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement