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!

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

Development Tools

Jaume Font
Jaume Font
5,110 Points

Help with code challenge

This is a fairly basic one but I'm getting stuck with: In the "actors" table INSERT a new actor with the name "Michael J. Fox".

My code of INSERT INTO actors VALUES('Michael J.Fox');

Returns an error message of: Bummer! Couldn't find the actor with the name 'Michael J. Fox' in the 'actors' table

Doing next doesn't help either ... insert into actors (name) values('Michael J.Fox');

What's wrong?

1 Answer

count
count
2,142 Points

Have you tried INSERT actors.name INTO actors or INSERT name INTO actors?

EDIT: Not an expert, I have not reached this point yet, but am making an assumption based on the syntax from the SELECT sections I'm going through.

Jaume Font
Jaume Font
5,110 Points

Thanks Rolando, I fixed my self, stupidity on the code challenger writer ... note that they ask you to insert "Michael J. Fox" but I was inserting "Michael J.Fox" ... note the missing space between J. and Fox ... how stupid is that? challenge should be on the sql syntax, not the value of the varchar.

count
count
2,142 Points

AHHH, now that I look more closely, you do have a space missing in the text you pasted. I'll be sure to watch out for that once I get there!

I would argue that the values you assign are just as important as syntax though :)