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 Reporting with SQL Working with Text Concatenating Text

Jeremy Jones
Jeremy Jones
886 Points

Unclear what I am getting wrong...

Challenge Task 1 of 2 for the Contenation exercise, inputting code as:

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

And it only tells me "Something's wrong."

I wish it would show you the correct answer so you could learn instead of just telling you it's wrong...

2 Answers

You are missing angle brackets <> that enclose the email.

Jeremy Jones
Jeremy Jones
886 Points

Right, but I am unclear on how it wants me to get that part in; I tried several ways and it keeps telling me I'm still wrong.

Jeremy Jones
Jeremy Jones
886 Points

(thank you for responding)

I'm assuming you got it by now - but just in case

SELECT first_name || " " || last_name || " <" || email || ">" AS "to_field" FROM patrons
Jeremy Jones
Jeremy Jones
886 Points

Thanks Kris; I feel like it's troubling because there wasn't anything in the lesson I recall about being able to leave a "dangling concatenation" (for lack of a better term of what to call it when I don't close it on both side with the pipes)...