db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øystein Grøvlen <Oystein.Grov...@Sun.COM>
Subject Re: Problem with valueSpecification() grammar rule
Date Sun, 28 Oct 2007 14:11:14 GMT
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


Mime
View raw message