Re: Retrieving the 'oldest' record and deleting it

2013-10-22 Thread Rick Hillegas
On 10/21/13 11:53 AM, Bob M wrote: Hi I have the following code which retrieves the 'oldest' record and prints out some data rs = s.executeQuery(SELECT from tablename ORDER BY Date ASC, Time, ASC FETCH FIRST ROW ONLY); rs.next(); String Date = rs.getString(Date); String Date =

Re: Retrieving the 'oldest' record and deleting it

2013-10-22 Thread Bob M
Thanks Rick Keeping the code 'in sync' is difficult when applying example code :) Will the following do what I am seeking? rs = s.executeQuery(SELECT from tablename ORDER BY Date ASC, Time, ASC FETCH FIRST ROW ONLY); rs.next(); String Date = rs.getString(Date); String Date =

Re: Retrieving the 'oldest' record and deleting it

2013-10-22 Thread Rick Hillegas
On 10/22/13 10:40 AM, Bob M wrote: Thanks Rick Keeping the code 'in sync' is difficult when applying example code :) Will the following do what I am seeking? rs = s.executeQuery(SELECT from tablename ORDER BY Date ASC, Time, ASC FETCH FIRST ROW ONLY); rs.next(); String Date =

deleting a record - still a problem

2013-10-22 Thread Bob M
Hi there The error is that my SELECT can not have For UPDATE My current code is *** // retrieve and output date and time of oldest record from the table rs = s.executeQuery(SELECT * FROM tablename ORDER BY Date ASC, Time ASC FETCH FIRST ROW ONLY); rs.next(); String