[SQL] using the aggregate function max()

2011-09-22 Thread John Fabiani
Hi, I need a little help understanding how to attack this problem. I need to find the max(date) of a field but I need that value later in my query. If I select max(x.date_field) as special_date from (select date_field) from table where ...)x I get one row and column. But now I want to use

Re: [SQL] using the aggregate function max()

2011-09-22 Thread David Johnston
On Sep 22, 2011, at 22:49, John Fabiani wrote: > Hi, > I need a little help understanding how to attack this problem. > > I need to find the max(date) of a field but I need that value later in my > query. > > If I > select max(x.date_field) as special_date from (select date_field) from tab

Re: [SQL] using the aggregate function max()

2011-09-22 Thread John Fabiani
On Thursday, September 22, 2011 08:14:58 pm David Johnston wrote: > On Sep 22, 2011, at 22:49, John Fabiani wrote: > > Hi, > > I need a little help understanding how to attack this problem. > > > > I need to find the max(date) of a field but I need that value later in my > > query. > > > > If I

[SQL] use of savepoint in containter managed transaction

2011-09-22 Thread Amar Dhole
HI All, I have requirement to use save point. But I am using session bean whose transaction is managed by container. While executing sql insert I got unique key constraint because of this my other command following this exception got ignored. I want to continue my transaction even after this as

Re: [SQL] using the aggregate function max()

2011-09-22 Thread Thomas Kellerer
John Fabiani, 23.09.2011 04:49: I need to find the max(date) of a field but I need that value later in my query. If I select max(x.date_field) as special_date from (select date_field) from table where ...)x I get one row and column. But now I want to use that field in the rest of the query se