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

I seem to be getting correct results but my answer is not being accepted as correct

What am i doing wrong in the code?

Question: Create a report from the customers table that shows their first initial of their first name and alias it as initial. Select their last name too. Type in your command below.

My answer:

select upper(substr(first_name, 1, 1)) || " " || last_name as "initial" from customers;

Hello Mazen,

Please provide your code & a link to the code challenge you're on. This can really help us to understand what is wrong in your code :)

Steven Parker
Steven Parker
231,271 Points

Be careful about assuming your "correct" results are not being accepted. If you misunderstand the instructions, you will also be likely to misinterpret the results.

1 Answer

Steven Parker
Steven Parker
231,271 Points

But just looking at your query, I have a few guesses:

  • are you sure this task involved concatenation?
  • is it possible that the alias "initial" was only intended to apply to the first character?
  • are you sure the task required you to apply upper-case conversion?

If I haven't guessed the issue, please provide the link to the challenge page for a more accurate analysis.

The thing that is driving me crazy is this error message that pops up Bummer! Expecting results like 'L Chalkley' not 'L Chalkley'.

Done I fixed it. After multiple attempts it seemed like it didn't want the first and last names concatenated. Oh well now I will continue my coding journey. Thank you for your support.

By the way one last question, if I already know HTML, CSS, JS & Java but I don't want to go through the whole courses again can I do something to earn the badges and points?

Steven Parker
Steven Parker
231,271 Points

If you truly know the material, you can complete a course by taking just the quizzes and challenges. You'll get the badges and most of the points — all except the individual video points.