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 trialcodegritty
5,749 PointsHelp please. I have tried everything from the || to concat function, added quotes, spaced them out, and nothing!
How do I get this challenge? first name, last name, and email right? I did it just the way it showed me, but it's saying its wrong... I think there has to be a bug.
SELECT first_name || " " || last_name || " " || email AS "to_field" FROM patrons; Even added "<" ">" brackets on another query. even tried concat(). nothing.
It was this post: In the library database there's a patrons table listing all the users of the library. The columns are id, first_name, last_name, address, email, library_id and zip_code.
Generate a list of strings that are in the following format: Andrew Chalkley andrew@teamtreehouse.com. Concatenate the first name, last name and email address for all users.
Alias it to to_field. This will be used in the "To" field in email marketing.
1 Answer
Valeriya Romashchenko
11,841 PointsHi, by chance I was doing the same course recently. I double check my query and it passed the challenge. You are almost there!
> SELECT first_name || " " || last_name || " <" || email || ">" AS "to_field" FROM patrons
You could have added the space in the ">" after greater than symbol inside of the quotes, and it doesn't pass the challenge. I checked this as well
link to the challenge https://teamtreehouse.com/library/reporting-with-sql/working-with-text/concatenating-text
codegritty
5,749 Pointsyou were correct. it was actually a space that was needed before the " <" less than sign! Thank you so much! It was that tiny little detail that made the difference. Much appreciated.
Valeriya Romashchenko
11,841 PointsYou are welcome! Bugs are always tiny little things which hard to find ;)
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherCould you please link the challenge? There are quite a few SQL challenges and this will make it easier for us to assist you