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 trialAgnes Demes
6,613 PointsWhy am I getting an error message here?
Expecting results like 'L Chalkley' not 'L Chalkley' seem the same to me
Agnes Demes
6,613 Pointshttps://teamtreehouse.com/library/reporting-with-sql/working-with-text/creating-excerpts
SELECT SUBSTR(first_name, 1, 1) ||" "|| last_name AS initial FROM customers;
2 Answers
David Evans
10,490 PointsHi Agnes,
Thank you for adding your code and the link.
You're close, these challenges are looking for very specific things.
Its asking you to select the first initial of their first name, and alias that as initial. Right now you are selecting the first initial, concatenating a space and then selecting the last name and aliasing all that as initial.
The following code should help you get past the challenge.
SELECT SUBSTR(first_name, 1, 1) AS initial, last_name FROM customers
Agnes Demes
6,613 PointsOMG thank you so much it worked, I thought i tired that solution already but i mustn have
David Evans
10,490 PointsDavid Evans
10,490 PointsPlease add your code and a link to the challenge would be helpful.