Subject | Re: [ib-support] (:APARAM IS NULL) in SELECT WHERE clause... |
---|---|
Author | Claudio Valderrama C. |
Post date | 2002-04-12T04:18:50Z |
""tibotaka"" <belan@...> wrote in message
news:a94jrd+jl9k@......
it's known beforehand. However, in a direct SQL statement including
:param is null
or
cast(:param as some_data_type)
the engine clearly lacks a crystal ball to guess what data type you want for
"param". Hence, it complains.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
news:a94jrd+jl9k@......
>In the procedure, you are forced to declare the variables' data type. Hence,
> MY QUESTION: Why SELECT statement
>
> SELECT SUM(PRICE) FROM MY_DATA
> WHERE ((:ACREW_ID IS NULL) OR (CREW_ID = :ACREW_ID)) AND
> ((:ASALESREP_CODE IS NULL) OR (SALESREP_CODE = :ASALESREP_CODE))
>
> don't work alone? I always get compile error
it's known beforehand. However, in a direct SQL statement including
:param is null
or
cast(:param as some_data_type)
the engine clearly lacks a crystal ball to guess what data type you want for
"param". Hence, it complains.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing