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 trialYunus Emre Altanay
2,100 PointsI have an error like "Expecting results like 'L Chalkley' not 'L Chalkley'."
Whats the diffrence with this two results?
1 Answer
Steven Parker
231,248 PointsIt's probably the columns, not the data.
You forgot to include a link to the challenge page, but based on the results including the last name, I'd bet the entire thing was not supposed to be concatenated together and given the alias "initial".
Read the instructions again carefully, and I expect you will find that the alias "initial" was supposed to be only for the result of the SUBSTR
. And the last_name
was probably intended to be a column on it's own.
Yunus Emre Altanay
2,100 PointsSorry here thats the challenge page :) https://teamtreehouse.com/library/reporting-with-sql/working-with-text/creating-excerpts
Steven Parker
231,248 PointsSo I guessed correctly!
As I suggested before, the alias should apply only to the first letter you extract from first_name
, and last_name
is just a normal second column. This challenge does not use any concatenation.
Yunus Emre Altanay
2,100 PointsYunus Emre Altanay
2,100 PointsMy Query is this btw: SELECT SUBSTR(first_name, 1, 1) || " " || last_name || "" AS initial FROM customers;