[tinysql] SQL parsing problem

daniel carter dcarter@waitaki.otago.ac.nz
Mon, 2 Dec 2002 17:28:24 +1300


Hello.

I've encountered a problem with the SQL parser.

select pe_people from people where car_id =7 works
select p.pe_people from people as p where car_id=7 works
select p.pe_people from people as p where p.car_id=7 doesn't work :(

Unfortuantly it is the last form that my application uses.

I'm using the CVS as of today (latest stable release doesn't seem to work at all)


ORG.as220.tinySQL.tinySQLException: column p.car_id was not found
	at java.lang.Throwable.<init>(Throwable.java:96)
	at java.lang.Exception.<init>(Exception.java:44)
	at java.sql.SQLException.<init>(SQLException.java:84)
	at ORG.as220.tinySQL.tinySQLException.<init>(tinySQLException.java:48)
	at ORG.as220.tinySQL.sqlparser.ColumnValue.evaluate(ColumnValue.java:73)
	at ORG.as220.tinySQL.sqlparser.Expression.evaluate(Expression.java:128)
	at ORG.as220.tinySQL.sqlparser.WhereClause.isMatch(WhereClause.java:141)
	at ORG.as220.tinySQL.tinySQL.continueQuery(tinySQL.java:372)
	at ORG.as220.tinySQL.tsResultSet.getMoreResults(tsResultSet.java:231)
	at ORG.as220.tinySQL.tsResultSet.getResultRowAt(tsResultSet.java:375)
	at ORG.as220.tinySQL.tinySQLResultSet.next(tinySQLResultSet.java:135)
	at test.JDBCTest.main(JDBCTest.java:39)