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 trialKrishna Pratap Chouhan
15,203 PointsAre the Spaces before the SQL-query invalid?
Are the Spaces before the SQL-query invalid? If we append some spaces before the SQL query, does it makes an invalid SQL-query? for Example:
SELECT username AS "Username", first_name AS "First Name", last_name AS "Last Name" FROM users;
Gives the Error:
Bummer!
You should try writing a SELECT query
Whereas if i remove the spaces from the staring of the query, it works fine.
SELECT username AS "Username", first_name AS "First Name", last_name AS "Last Name" FROM users;
Andrew Chalkley
Treehouse Guest TeacherWhich code challenge is this?
Krishna Pratap Chouhan
15,203 PointsAndrew Chalkley SQL Basics> Getting Data from a Database > Categorizing Your Output as "AS"> Challenge Task 2 of 4.
1 Answer
Steven Parker
231,248 PointsSometimes the challenge is more picky than the language.
I think most SQL engines disregard leading spaces. But the challenge checking mechanism apparently does not.
Andrew Chalkley
Treehouse Guest TeacherHey Steven Parker and Krishna Pratap Chouhan
I've updated this challenge to accept white space at the beginning.
If you spot any other issues like this let me know!
Regards
Andrew
Steven Parker
231,248 PointsGood deal. Does Krishna get an "Exterminator" for discovering it?
Krishna Pratap Chouhan
15,203 PointsKrishna Pratap Chouhan
15,203 PointsAndrew Chalkley Help needed.