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
okkie ricardoe
5,236 PointsBuild Error
syntax error (code 1): , while compiling: CREATE TABLETEMPERATURES (_ID INTEGER PRIMARY KEY AUTOINCREMENT, TEMPERATURE REAL)
1 Answer
Ben Deitch
Treehouse TeacherNot 100% what's going on here without some more context, but there should definitely be a space between TABLE and TEMPERATURES.
okkie ricardoe
5,236 Pointsokkie ricardoe
5,236 PointsIn my real code: private static final String DB_CREATE = "CREATE TABLE" + TABLE_TEMPERATURES + " (" + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COLUMN_TEMPERATURE + " REAL)";
Ben Deitch
Treehouse TeacherBen Deitch
Treehouse TeacherYep, you likely need to add a space after TABLE (i.e. ...= "CREATE TABLE " + ...). Otherwise 'TABLE' will be right up against the TABLE_TEMPERATURES variable, and you get some SQL that looks like:
CREATE TABLETEMPERATURES ...
When it should be:
CREATE TABLE TEMPERATURES ...