Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

donald kaiser
donald kaiser
9,736 Points

I'm trying to replace symbols within an email and when I put in my code, it just says "Bummer Try again!"

https://teamtreehouse.com/library/reporting-with-sql/working-with-text/replacing-strings

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

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! I think you're probably doing pretty well here, but things are mostly just a bit out of order. Also, the WHERE is not needed for this particular challenge.

I'll show you what I did and walk you through it:

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

Immediately after the SELECt we choose replace. Then we say what column we want to replace. In this case the email. And we say which part of the string we want to replace, and finally, what we want to replace it with. Then we specify our alias and of course, tell it which table we are selecting from.

Hope this helps! :sparkles: