Subject | How can I set the parameter type? |
---|---|
Author | Marco Menardi |
Post date | 2002-11-06T14:35:12Z |
I use IB_Query (4.2Ia, Firebird 1.01). Sometime I need something like this:
Select * from customers where customers.code=(substr(:P_CODE,1,2))
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 unknown" is generated (the same with QuickDesk SQL editor).
How can I tell IB_Query the type of the parameters (i.e. char(6), so that a substr() can work?
Thanks
Marco Menardi
Select * from customers where customers.code=(substr(:P_CODE,1,2))
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 unknown" is generated (the same with QuickDesk SQL editor).
How can I tell IB_Query the type of the parameters (i.e. char(6), so that a substr() can work?
Thanks
Marco Menardi