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

Business

Michael Fahrun
Michael Fahrun
3,045 Points

Task - statement doesn't work

select id, first_name || ' ' || last_name || ' <' || email || '> ' as 'to_field', address, library_id, zip_code from patrons;

task is to join multiple colums to one to get the following colum filled like this <firstname> <lastname> <<email>> (so email wrapped up with "<" and ">" usually with this statement the email adress should be displayed as followed: max.mustermann@bla.de.

Nethertheless the email address does not get displayed at all at the point where i add the "<" symbol to the statement-....be it as separate string to join or done like above

whats the mistake? i don't see it

1 Answer

You didn't give a link to the challenge so I'm guessing here, and it's not tested, but it looks like what they want is something along these lines:

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

where the email address is inside angle brackets.