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

Development Tools

David Parsons
David Parsons
6,743 Points

String Functions Challenge 2 of 3

I am stuck on the 2nd code challenge in the String Functions challenge:

The code I have entered:

SELECT CONCAT("first_name " ",(username), ") AS display_name FROM users;

I have tried for ages and cannot get it right.

Any tips?

3 Answers

I havent seen this challenge before, got no idea what it is trying; but I am going to guess the error:

You dont need to put quotation marks around it if it is already a string variable.

SELECT CONCAT(first_name, " ", "(",username,")") AS display_name FROM users;

Just as you put the space between the name in quotes, you put quotes around each parentheses.

Try this;

SELECT CONCAT(first_name, " ","(",username,")") AS display_name FROM users;