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 trialJose Testa
2,051 PointsSelecting a column so that all the rows would appear between <> operators.
How do I select the column called email from the table called patrons so that all the email would appear between the <> operators. Example: sjhs@hotmail.com.
The email column is to be concatenated with first and last mame columns, and the emails are to show in the format of the example above.
2 Answers
Jason Larson
8,361 PointsTo add in extra strings to your concatenation, just enclose them with double quotes, like so: select first_name || " " || last_name || " <" || email || ">" as to_field from patrons;
Steven Parker
231,271 PointsYou're probably using concatenation already for this challenge, so you can easily concatenate fixed strings along with the other data. For example, if you were just displaying the email alone, you might do this:
SELECT '<' || email || '>' FROM patrons
You might want to remove the link from your example email address so bots don't find it and spam it.
Jose Testa
2,051 PointsThanks, Steven!
Jose Testa
2,051 PointsJose Testa
2,051 PointsThank you very much, Jason!