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

Agnes Demes
Agnes Demes
6,613 Points

Why am I getting an error message here?

Expecting results like 'L Chalkley' not 'L Chalkley' seem the same to me

David Evans
David Evans
10,490 Points

Please add your code and a link to the challenge would be helpful.

Agnes Demes
Agnes Demes
6,613 Points

https://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
David Evans
10,490 Points

Hi 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
Agnes Demes
6,613 Points

OMG thank you so much it worked, I thought i tired that solution already but i mustn have