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 trialPamela LaMarca
1,072 PointsPrevious exercise - Concatenate text and place <> around email address - your examples and teaching are very unclear.
Your explanation and examples as to how to concatenate a first name, last name, and email address with brackets around it are very unclear. Our DBA could not figure out what it is you wanted in the example, even after trying a dozen or more times.
3 Answers
Diana Ci
18,672 PointsIt works like this: SELECT first_name || " " || last_name || " <" || email || ">" AS to_field FROM patrons;
Angie Clark
Front End Web Development Techdegree Student 19,986 PointsThanks for this!!- I didn't quite catch that we don't have to put quotes around an alias with no spaces in it.
Matthew Reinhart
651 PointsYour DBA might want to consider going through the classes. The answer, while challenging, wasn't particularly difficult after a try or two.
Coding, even in SQL, is about problem solving. So it's natural and makes sense that the questions are going to require you to problem solve a bit more than what is given.
Stephen Hanlon
11,845 PointsSELECT to_field AS "To", first_name || "" "" || last_name || " " || "<" || email || ">" FROM patrons;
I couldn't get this to work but not sure why. The "Alias it to the to_field" didn't make sense wince there is no to_field in the example. Error kept saying syntax error with "||"..> triple checked the spaces but still can't solve it.
Ololo Olololo
Courses Plus Student 1,816 PointsThe correct one is: SELECT first_name || " " || last_name || " " || "<" || email || ">" AS to_field FROM patrons;
Steven Parker
231,198 PointsSteven Parker
231,198 PointsYour DBA couldn't figure it out? But this is a Beginner level course!
Seriously, the challenges can sometimes be a bit tricky, but I doubt most beginners taking the course need more than a few tries to pass the challenge.
The most common causes for people asking for help is they either forget to include a space between the name and the open angle, or they don't realize they can mix literal strings and fields when concatenating.
If you couldn't solve it yourself, and the above issues don't resolve it, feel free to post your code here for some specific help.