I have just run through this code twenty times and the following so-called 'oldest' records were deleted:-
Date and Time (which is the primary key) 1) 01-03-2011, 0 2) 01-03-2011, 6 3) 01-03-2011, 12 4) 01-03-2011, 18 5) 01-03-2012, 0 6) 01-03-2012, 6 7) 01-03-2012, 12 8) 01-03-2012, 18 9) 01-04-2009, 0 10) 01-04-2009, 6 11) 01-04-2009, 12 12) 01-04-2009, 18 13) 01-04-2010, 0 14) 01-04-2010, 6 15) 01-04-2010, 12 16) 01-04-2010, 18 17) 01-04-2011, 0 18) 01-04-2011, 6 19) 01-04-2011, 12 20) 01-04-2011, 18 It would appear that my so-called 'date' field is not a good field to have in a primary key! Bob M -- View this message in context: http://apache-database.10148.n7.nabble.com/Problem-retrieving-the-oldest-record-tp135855p135863.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
