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

mySQL String Functions Challenge 3 of 3

Help! I don't know what's wrong with my code!

Select the first letter of the "first_name", add a period after it, followed by a space and add the "last_name". Call it "name". Example "A. CHALKLEY".

Here's my code but it's not working: SELECT CONCAT(SUBSTRING(UPPER(fistname),1,1) . ". " . UPPER(last_name)) AS name FROM users;

1 Answer

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

The code you posted has . (periods) instead of , (commas) after closing SUBSTRING parenthesis. Also after UPPER you incorrectly typed the column name as fistname instead of first_name.

It should look like this.

SELECT CONCAT(SUBSTRING(UPPER(first_name),1,1),". ",UPPER(last_name)) AS name FROM users;

Thank you very much for the help Chris! ^_^