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 trialA X
12,842 PointsChanging Cases of Strings: Code Challenge 2 Trouble
The Complete Challenge 2 Statement: The library is generating new library cards that will display the full name and their library ID. The full name needs to have the last name in all caps. Create a report with two columns of results, one is an alias of full_name the second being the library_id.
My code seems to produce the wanted results according to the directions:
SELECT first_name || ' ' || UPPER(last_name) AS "full_name", id AS "library_id"
FROM patrons;
however, I get an error: Expected results to look like "Andrew CHALKLEY", "MCL1001" not "Alena HOLLIGAN", 3. However, the library ID number is only 1 digit long (1, 2, 3, 4). So I'm not sure if the challenge is missing some information on something I'm to be doing with the id or if I'm missing something that's explained more clearly than I think it is.... Can anyone offer advise? Thanks!
1 Answer
Steven Parker
231,261 PointsThe patrons table includes a column for library_id.
Return the library_id column directly instead of aliasing the name of the id column.
A X
12,842 PointsA X
12,842 PointsThis is an example of one of those times where I was staring at the problem too long, and I wasn't able to think of what was wrong. Thanks for providing the outside assist I needed!
Emmet Lowry
10,196 PointsEmmet Lowry
10,196 PointsI dont really understand what you are saying.