Databases Reporting with SQL Working with Text Replacing Strings

Øystein Kallset
Øystein Kallset
637 Points

What is wrong with this SQL-statement: SELECT REPLACE(email,"@","<at>") FROM customers

Im getting: Expecting results like Lauren.Chalkley<at>http://example.com not Lauren.Chalkley<at>http://example.com.

The problem is at: https://teamtreehouse.com/library/reporting-with-sql/working-with-text/replacing-strings

1 Answer

joelearner
joelearner
36,513 Points

Hi Øystein,

You basically have it! Just remember to follow the instruction that asks you to alias your column as "obfuscated_email". So your completed code will look something like this:

SELECT REPLACE(email,"@","<at>") AS obfuscated_email FROM customers

Cheers!