calculated fields always string datatype
Posted: 07.01.2011, 23:01
Hi,
I think ZeosLib might be returning fields with incorrect datatypes.
count(1) and cast(count(1) as integer) gives a text result?
more to the point, cast(((myfloatfield*myotherfloatfield)/100) as real) gives a text result!
For example
SELECT
Orders.ID AS OrderID,
Mixes.ID AS MixID,
Mixes.Percentage AS Percentage,
/* count(1),*/
/* cast(cout(1) as integer), */
/* 1 as one,*/
/* cast(1 as integer) AS one,*/
(Orders.Total/100)*Mixes.Percentage AS SubTotal
FROM
Orders, Mixes
But I can't get them to return as integer or real datatypes.
- V
I think ZeosLib might be returning fields with incorrect datatypes.
count(1) and cast(count(1) as integer) gives a text result?
more to the point, cast(((myfloatfield*myotherfloatfield)/100) as real) gives a text result!
For example
SELECT
Orders.ID AS OrderID,
Mixes.ID AS MixID,
Mixes.Percentage AS Percentage,
/* count(1),*/
/* cast(cout(1) as integer), */
/* 1 as one,*/
/* cast(1 as integer) AS one,*/
(Orders.Total/100)*Mixes.Percentage AS SubTotal
FROM
Orders, Mixes
But I can't get them to return as integer or real datatypes.
- V