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 trialMazen El Doe
2,446 PointsI 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;
Steven Parker
231,248 PointsBe 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
231,248 PointsYou forgot to provide a link to the challenge.
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.
Mazen El Doe
2,446 PointsThe thing that is driving me crazy is this error message that pops up Bummer! Expecting results like 'L Chalkley' not 'L Chalkley'.
Mazen El Doe
2,446 PointsDone 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
231,248 PointsIf 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.
Alexander Davison
65,469 PointsAlexander Davison
65,469 PointsHello 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 :)