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 trialRaymond Moore
Full Stack JavaScript Techdegree Student 11,174 PointsSQL Query ?
I'm looking for a little assist on this one. I have been stuck for about 5 mins.
Raymond Moore
Full Stack JavaScript Techdegree Student 11,174 PointsHi Steven-
Actually I found out the problem was with syntax within the query. I forgot to place double quotes around the condition string value (e.g. SELECT * FROM books WHERE genre = 'Fantasy' ORDER BY first_published ASC LIMIT 5;)
I placed my initial issue in single quotes within the query. After reviewing a video from the basic SQL I then changed it to (i.e genre = "Fantasy").
However, thanks for the quick response :) Ray
1 Answer
Steven Parker
231,109 PointsThis is very strange, single quotes are actually correct for string literals, but double quotes are also accepted in some situations. For more details see this SQLite documentation page.
So I tried pasting your initial query (with the single quotes) directly into the challenge ... and it passed!
I can only think that there may have also been a typo that got fixed when you changed the quotes, but in any case, congratulations on resolving your issue.
Steven Parker
231,109 PointsSteven Parker
231,109 PointsPlease show your query code so we can see what's happening.