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

Youssef Zaki
Youssef Zaki
7,768 Points

Can't add 2 Angle Brackets

Trying to add the other angle bracket for email gives SQL error, Help?

SELECT first_name || " " || last_name ||" <"|| email AS "to_field" FROM patrons;

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

Maryna Nogtieva
Maryna Nogtieva
12,005 Points

you shouldn't use double quotes and don't put semicolon in the end; I tried this:

 select first_name || ' ' || last_name || ' ' || '<' || email || '>' as to_field from patrons

and it worked

1 Answer

Steven Parker
Steven Parker
231,271 Points

:point_right: You're just missing the closing angle on the other side of email.

Your double quotes are fine, you just need that one more angle at the end:

SELECT first_name || " " || last_name || " <" || email || ">" AS to_field FROM patrons;

The quotes around "to_field" are OK, but aren't necessary. The semicolon at the end is optional, but good practice.