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 trialLolidie Jeena Zubiri
13,238 PointsmySQL 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
Python Web Development Techdegree Graduate 49,702 PointsThe 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;
Lolidie Jeena Zubiri
13,238 PointsLolidie Jeena Zubiri
13,238 PointsThank you very much for the help Chris! ^_^
Chris Howell
Python Web Development Techdegree Graduate 49,702 PointsChris Howell
Python Web Development Techdegree Graduate 49,702 PointsNo problem! It took me a few tries also.