Dhananjay Muli wrote:
Hello,
I am facing problem with a query in postgresql having following condition in where clause

bullyear=(acadyear-year+1)

where acadyear, bullyear and year are columns of table. The existing sqlgrammar.jj file has a problem parsing the 'year' token occurence after the '-' sign. It expects a literal value there. The exception while parsing the query is given at the end. I modified valueSpecification() rule to add a new rule (the first one in the two rules given below) so that grammar should also allow column reference along with literal values.


Maybe your problem is that YEAR is a reserved word in Derby. Hence, it should not be used for the name of a column. However, it seems strange that you have been able to use a reserved word for the name of a column.

--
Øystein

Reply via email to