[SQLiteJDBC] SQLException: no such column

Stephen Haberman stephen at exigencecorp.com
Wed Dec 23 10:12:14 EST 2009


> PreparedStatement stmt = conn
> 		.prepareStatement("SELECT tags.tag "
> 				+ "FROM ( tags, has_tag ) WHERE has_tag.content_id=? "
> 				+ "AND has_tag.tag_id=tags.tag_id");
> stmt.setLong(1, id);

You could try doing "FROM (tags tags, has_tag has_tag)"

sqlite may only like "tags.tag" if "tags" is explicitly defined as an
alias and not default to table names.

Haven't tried it, just an idea.

- Stephen




More information about the SQLiteJDBC mailing list