Re: Updating the last column in the newest record

2015-01-29 Thread Alex
*Subject:* Updating the last column in the newest record Hi I am wishing to (1) locate the newest record in a database (latest date and time) (2) update the last column (27th) labelled PROFIT_LOSS I have the following code but it seems to update all records in the database Can't see what I am doing

Re: Updating the last column in the newest record

2015-01-29 Thread Bob M
Hi I now have the following code but NO update takes place??? psUpdate = conn.prepareStatement(update TABLE SET PROFIT_LOSS=? WHERE PROFIT_LOSS=?); Bob M -- View this message in context: http://apache-database.10148.n7.nabble.com/Updating-the-last-column-in-the-newest-record

Re: Updating the last column in the newest record

2015-01-29 Thread John English
On 29/01/2015 20:10, Bob M wrote: Hi I now have the following code but NO update takes place??? psUpdate = conn.prepareStatement(update TABLE SET PROFIT_LOSS=? WHERE PROFIT_LOSS=?); ...which suggests that you have no rows whose PROFIT_LOSS column matches the value of the second parameter.

Re: Updating the last column in the newest record

2015-01-29 Thread Bob M
: http://apache-database.10148.n7.nabble.com/Updating-the-last-column-in-the-newest-record-tp143710p143715.html Sent from the Apache Derby Users mailing list archive at Nabble.com.

Re: Updating the last column in the newest record

2015-01-29 Thread Alex
for you. /--Regards, Alex/ *From:* Bob M rgmatth...@orcon.net.nz *Sent:* Thursday, January 29, 2015 9:10PM *To:* Derby Discussion *Subject:* Re: Updating the last column in the newest record Hi I now have the following code

Re: Updating the last column in the newest record

2015-01-29 Thread Bob M
); psUpdate.executeUpdate(); // commit the above transactions conn.commit(); // end updating Profit -- View this message in context: http://apache-database.10148.n7.nabble.com/Updating-the-last-column-in-the-newest-record-tp143710p143719

Re: Updating the last column in the newest record

2015-01-29 Thread Bob M
-database.10148.n7.nabble.com/Updating-the-last-column-in-the-newest-record-tp143710p143718.html Sent from the Apache Derby Users mailing list archive at Nabble.com.

Re: Updating the last column in the newest record

2015-01-29 Thread Bob M
and is not in the GROUP BY list. If this is a CREATE or ALTER statement then 'PROFIT is not in the TABLE profit is a double variable? Bob M -- View this message in context: http://apache-database.10148.n7.nabble.com/Updating-the-last-column-in-the-newest-record-tp143710p143720.html Sent from

Updating the last column in the newest record

2015-01-28 Thread Bob M
M -- View this message in context: http://apache-database.10148.n7.nabble.com/Updating-the-last-column-in-the-newest-record-tp143710.html Sent from the Apache Derby Users mailing list archive at Nabble.com.