Subject | Re: [firebird-support] Re: problem of using SUM function with the the HAVING clause? |
---|---|
Author | Helen Borrie |
Post date | 2004-08-03T00:32:19Z |
At 11:43 PM 2/08/2004 +0000, you wrote:
ODS-10. Your database must be an ODS-9 or lower one (IB 5.6 or lower)
because double-quote delimiters on strings are not supported in ODS-10 and
above. It wouldn't work in Firebird 1.0 with a Firebird 1.0 or higher
database.
Under ODS-10, the clause where VORP > "" is interpreted as "where the value
in VORP is greater than the value in the column named [ascii 0]". You'd
get an exception under ODS-10, because there is no column named [ascii 0].
databases is significantly different from that in ODS-10 and higher.
/heLen
>Hi Helen,I guess it depends on whether you plan to upgrade the database to
>
>Thanks for the response. I was using interbase 6.0 with Firebird 1.0.
>
>When you say where VORP > "" is not legal syntax in Firebird. Do you
>mean the "" or the >? Although "" is not a SQL standard, but it works
>ok in Firebird 1.0 so it reduce a number of code execution to search
>and replace ' to '' from data entry. Do you think we should keep
>the "" in our SQL query?
ODS-10. Your database must be an ODS-9 or lower one (IB 5.6 or lower)
because double-quote delimiters on strings are not supported in ODS-10 and
above. It wouldn't work in Firebird 1.0 with a Firebird 1.0 or higher
database.
Under ODS-10, the clause where VORP > "" is interpreted as "where the value
in VORP is greater than the value in the column named [ascii 0]". You'd
get an exception under ODS-10, because there is no column named [ascii 0].
>I have fixed the query by: cast((sum(DB_AMOUNT)*100) as integer) -Does it get the results you expect? Number behaviour in ODS-9 and below
>cast((sum(CR_AMOUNT)*100) as integer) <> 0
databases is significantly different from that in ODS-10 and higher.
/heLen