Subject | IBO bug: parameters ouside where clause produce wrong datatype |
---|---|
Author | L.M. Bemmelmans |
Post date | 2003-07-18T07:32:35Z |
Hi,
If I put parameters outside the WHERE clause (works perfectly in combination
with firebird) IBO (latest build) messes up the parameters
In this case mydate processes as "string" in stead of "date" and myEMployee
processes as "date" in stead of "string"
SELECT
SUM( CASE WHEN date = :mydate THEN hours ELSE 0 END ) as TotalThisDay,
SUM( hours ) as TotalThisWeek,
FROM
mytable
WHERE
employee = :myemployee
AND
date >= :myMonday and date <= :mySunday
Leon
If I put parameters outside the WHERE clause (works perfectly in combination
with firebird) IBO (latest build) messes up the parameters
In this case mydate processes as "string" in stead of "date" and myEMployee
processes as "date" in stead of "string"
SELECT
SUM( CASE WHEN date = :mydate THEN hours ELSE 0 END ) as TotalThisDay,
SUM( hours ) as TotalThisWeek,
FROM
mytable
WHERE
employee = :myemployee
AND
date >= :myMonday and date <= :mySunday
Leon