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 trialrh16
3,781 PointsINSERT INTO CONCERTS VALUES (10, ‘2018-03-22’, ‘Vancouver’, ‘BC’, ‘BC Place’, ‘Canada’); produces error
Error: unrecognized token: "22’" Why? my code is the same as in the video - https://teamtreehouse.com/library/altering-tables-2
This is regarding altering tables. I have run into so many problems with this course where I follow EXACTLY what the instructor says and it does not work.
What am I doing wrong?
Thanks for your help - I searched prior questions and could not find anything about this error. I also looked on line and could not find an answer I understood.
I think I see part of the problem. The data type for ID in the CONCERTS table is INTEGER when it should be SMALLINT. I don't know how that happened and don't know how to change it. I guess I will be doing more research, but would appreciate any help I could get. SQL Lite is not very friendly and I don't know why anybody would use it.
1 Answer
rh16
3,781 PointsI figured it out. For some reason, the single quotes around the values weren't actually single quotes, but were - I don't know how to describe this - right side up and upside down single quotes, if that makes any sense. I have seen this before and don't know how it happens. I changed them to single quotes and it worked. BTW, the video says this query is in the Teacher's notes for this video, but it's not.