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!
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
Joshua Wallace832 Points
Using Concatenation to add angular brackets around an email? Like so <firstname.lastname@example.org>.
Hi, I am have troubling with "Reporting with SQL" Challenge task 1 on the topic of Concatenation. Here is my code. SELECT first_name || " " || last_name || " " || email AS to_field FROM patrons;
I am trying to get the result "FirstName LastName Name@example.com." but I can only get the result "FirstName LastName Name@example.com". I am trying to figure out how to add angular brackets "<>". Any assistance is much appreciated.
Steven Parker224,848 Points
You didn't blockquote your code, so I'm not sure your examples are being displayed as you intended.
But including the angles inside strings should do the job:
SELECT first_name || " " || last_name || " <" || email || ">" AS to_field FROM patrons;