Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Databases

Expecting results like 'L Chalkley' not 'L Chalkley'.

WHAT I S MISTAKE IN MY CODE.

If you share your code in your question, you might be able to get some help :)

2 Answers

Steven Parker
Steven Parker
220,378 Points

The problem could be with your columns.

Since you did not show your code or provide a link to the challenge, this is a bit of a guess. But since the message make the data seem correct, it's likely that you have the wrong number columns or they have the wrong name(s).

For instance, the challenge may have asked for separate columns but you joined them with concatenation (or vice versa). Or perhaps the challenge asked for a specific column alias that you may have omitted.

If these guessed hints don't lead you to a solution, please post your code and provide a link to the challenge for a complete and accurate analysis.

Rachid Allal
Rachid Allal
2,912 Points

SELECT SUBSTR(first_name,1,1) ||" "||last_name AS "initial" FROM customers;

i wrote this , and still gets the same error message

Steven Parker
Steven Parker
220,378 Points

I'm still not sure what challenge this is for, but I'd bet the alias "initial" is only intended to apply to the letter extracted by the SUBSTR function. The last_name is probably intended to be another column (with no concatenation used).