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

Challenge is giving me problems!

I am not sure even where to start on this challenge. I reviewed the video, but I'm still a bit stumped. Here is the link directly to the challenge: https://teamtreehouse.com/library/reporting-with-sql/working-with-text/concatenating-text Thanks for your help!

~Gabriel

1 Answer

The double pipe, ||, is used in this version of SQL as && or AND are used in others. It concatenates.

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

So then you need to put together the parts they want concatenated: the first_name, the last_name and then the email. But to make it more interesting they want the email inside angle brackets. Finally, you need to alias it all using the keyword AS.

Great! Thank you so much!