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
"Expecting results of L Chalkley, not L Chalkley" error.
Don't quite understand why I am getting this, did I do something wrong? The code below generates the correct table. Does the code challenge expect something else?
SELECT SUBSTR(first_name, 1, 1) || " " || last_name AS "initial" FROM customers;
Anders Prytz26,193 Points
Just did the exercise myself. The task doesn't want you to concatinate the results, it wants it in two different columns having the initial and last_name in separate columns. You are getting the correct information, but not in the expected way.
SELECT SUBSTR(first_name, 1, 1) AS 'initial', last_name FROM customers; -> should do the trick.
Steven Parker229,005 Points
Perhaps you don't have the right number of columns.
You didn't provide a link to the challenge so I could check, but just guessing from the name of the alias, I'd bet it was intended to be applied only to the result of the function. And I'd also guess that the last name was intended to be a separate column, with no concatenation involved.
If that's not it, please provide a link the course page and I'll take another look.