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 trialDeborah Watson
2,614 PointsHow do I correctly format the email?
The challenge is to generate a list of patrons with the first name , last name and email concatenated. Format email to tiny@email.com how is this done?
2 Answers
Steven Parker
231,269 PointsYou'll notice that in the format sample shown in the instructions, there are some spaces and symbols. You'll need to include some literal strings with your columns as you construct the SELECT clause.
Partial example.:
SELECT /*other bits...*/ || ' <' || email || '>' /*...alias and other clauses*/
Deborah Watson
2,614 PointsLike this? SELECT last_name || " " || first_name ||' <' || email || '>' AS "to _field" From patrons;
Deborah Watson
2,614 PointsI am still getting an error.
Steven Parker
231,269 PointsIt looks like you reversed the name order since last time, but the challenge is expecting first names first.
Also, your alias is "to _field
" (with a space) , but the instructions ask for ""to_field
" (no space)
Deborah Watson
2,614 PointsDeborah Watson
2,614 PointsI tried this syntax and I'm told it is incorrect SELECT first_name || last_name ||" "|| "<" || email || ">" || as "To" FROM patrons;
Deborah Watson
2,614 PointsDeborah Watson
2,614 PointsI tried this and it did not work. I am working in sql basic / reporting.
Steven Parker
231,269 PointsSteven Parker
231,269 PointsYou're close, but you still have a few issues:
to_field
"