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

Kerry Collier
seal-mask
.a{fill-rule:evenodd;}techdegree
Kerry Collier
Front End Web Development Techdegree Student 16,151 Points

Not sure how this isn't the correct format?

I keep getting told my query needs didn't meet the requirements, but aside from a set of <> not being around the email address, which I'm not seeing anything in the videos how to do, I can't figure out where I'm going wrong...

Can you link to the challenge you're on and what query you're trying?

2 Answers

Steven Parker
Steven Parker
229,967 Points

When combining the strings to create the concatenated column, remember to include spaces between the items. And in the case of the email, you also need to enclose it in angles, like this:

rest_of_string || ' <' || email || '>' -- notice that the space is included with that opening angle (<).

Kerry Collier
seal-mask
.a{fill-rule:evenodd;}techdegree
Kerry Collier
Front End Web Development Techdegree Student 16,151 Points

Thought it did it automatically. First time posting a question...let me see... 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.

SELECT first_name || " " || last_name || " " || email AS "To" FROM patrons;

Steven Parker
Steven Parker
229,967 Points

Looks like you had most of it .. just add the angles and I think you'll have it. But, as I recall, wasn't the column name alias a bit longer? Seems like it was To_something, right?

And it should add the links and code automatically if you use the "Get Help" button inside the challenge.