Hi
I hope somebody can point me in the right direction
I have a query
"SELECT Stock, TranDate, MAX(Close) FROM Prices1 WHERE Stock = 'XXX.AX' AND TranDate >= '2015-01-01'"
which produced the result I would expect in two SQL Browsers running on my PC ie giving the Stock code that I inquired on, the MAX(Close) price and the Date of the MAX(Close) record
When I run this command in config.properties
"sql.select_stoploss_01=SELECT Stock, TranDate, MAX(Close) FROM Prices1 WHERE Stock = ? AND TranDate >= ?"
I get the correct Stock Code and MAX(Close) value but the TranDate is the Date of the lastest (last) record in the table for the Stock Code.
The Select query gets run for numerous Codes and the results are all the same, correct code and MAX(Close) but incorrect TranDate
Thanks in Anticipation
I hope somebody can point me in the right direction
I have a query
"SELECT Stock, TranDate, MAX(Close) FROM Prices1 WHERE Stock = 'XXX.AX' AND TranDate >= '2015-01-01'"
which produced the result I would expect in two SQL Browsers running on my PC ie giving the Stock code that I inquired on, the MAX(Close) price and the Date of the MAX(Close) record
When I run this command in config.properties
"sql.select_stoploss_01=SELECT Stock, TranDate, MAX(Close) FROM Prices1 WHERE Stock = ? AND TranDate >= ?"
I get the correct Stock Code and MAX(Close) value but the TranDate is the Date of the lastest (last) record in the table for the Stock Code.
The Select query gets run for numerous Codes and the results are all the same, correct code and MAX(Close) but incorrect TranDate
Thanks in Anticipation