db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zorro <hz0...@gmail.com>
Subject Re: Is this code correct ?
Date Mon, 03 Dec 2018 08:05:28 GMT
On 12/3/18 2:23 AM, Bob M wrote:
> The program actions line 8 where it prints out the penultimate record Date
> and Time
>
> However, the next line - rs = s.executeQuery("SELECT.......FOR UPDATE"); is
> not working
>
> I can not understand why ?
>
> Bob M

rs = s.executeQuery("SELECT p0 FROM HOURLY_HISTORY WHERE TRADING_DATE =
Date_temp AND TRADING_TIME = Time_temp FOR UPDATE");

I think you should use string concatenation for the above statement or use a prepare to have
the content of Time_temp and Date_temp in the query.

Regards,
Harm-Jan Z.


Mime
View raw message