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

Johannes Scribante
Johannes Scribante
19,175 Points

SQL Expecting 'L Chalkley' but got 'L Chalkley'. Syntax/structure/specific error?

Code Challenge

In an ecommerce database there's a customers table with id, username, first_name, last_name, password, email and phone columns. 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.

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

So this is what I tried:
SELECT SUBSTR(first_name, 1, 1) AS intial, last_name FROM customers;

I also tired
SELECT SUBSTR(first_name, 1, 1) || " " || last_name AS intial FROM customers;

Both of these produce either one or two columns with 'L Chalkley'. Does someone perhaps know if they are looking for something more specific? Maybe a slight syntax error? Or not exactly how the code challenge is set to validate it?

Johannes Scribante
Johannes Scribante
19,175 Points

Nevermind, I just had to refresh my close and reopen my browser window. :)