Field of query result returns 0
Posted: 04.04.2008, 10:29
Hi to all,
I am using Borland C++ Builder 5, MySQL 4.1.14 and Zeos components 6.6.2.
When I execute the following query:
SELECT Value AS Value FROM Table (Value is an INTEGER column, stupid in this case to give it the same name, but you will see later why)
I get the expected result. But when I execute this query:
SELECT Value/1000 AS Value FROM table
The result is always 0 for every possible value. When I execute the following query:
SELECT Value/1000 FROM table
The result is OK. It seems that when I rename a column to a column that already exists in that table, the results is 0 when that column is an integer column and the results needs to be of type float
I first thought this would be a MySQL problem but with my previous components of zeos 6.1.5 this problem didn't occur. Could this be a zeos bug ? Or Am I doing something wrong ?
Thank you very much for a (quick) response!
I am using Borland C++ Builder 5, MySQL 4.1.14 and Zeos components 6.6.2.
When I execute the following query:
SELECT Value AS Value FROM Table (Value is an INTEGER column, stupid in this case to give it the same name, but you will see later why)
I get the expected result. But when I execute this query:
SELECT Value/1000 AS Value FROM table
The result is always 0 for every possible value. When I execute the following query:
SELECT Value/1000 FROM table
The result is OK. It seems that when I rename a column to a column that already exists in that table, the results is 0 when that column is an integer column and the results needs to be of type float
I first thought this would be a MySQL problem but with my previous components of zeos 6.1.5 this problem didn't occur. Could this be a zeos bug ? Or Am I doing something wrong ?
Thank you very much for a (quick) response!