Subject | Re: How can I set the parameter type? |
---|---|
Author | Eric Handbury |
Post date | 2002-11-06T20:16:17Z |
--- In IBObjects@y..., "Marco Menardi" <mmenaz@l...> wrote:
I haven't tried this, but could you cast it? say...
select * from customers where code = (substr(CAST(:P_CODE AS CHAR
(6)),1,2))
> I use IB_Query (4.2Ia, Firebird 1.01). Sometime I need somethinglike this:
> Select * from customers where customers.code=(substr(:P_CODE,1,2))unknown" is generated (the same with QuickDesk SQL editor).
>
> Or add a where conditions like:
> ...
> and ((strlen(:P_CODE)=2) or (:P_CODE='AAAA'))
> ...
> But when I try this in the IB_Query editor, the error "data type
> How can I tell IB_Query the type of the parameters (i.e. char(6),so that a substr() can work?
I haven't tried this, but could you cast it? say...
select * from customers where code = (substr(CAST(:P_CODE AS CHAR
(6)),1,2))