Hi,

This has nothing to do with FDB. Parameters (?) are implemented by 
Firebird engine itself, FDB just supports it. So you should ask such 
question in Firebird-support list, or check out 
https://stackoverflow.com/questions/37348807/data-type-unknown-in-case-expression-with-only-parameters-as-values

regards
Pavel Cisar
IBPhoenix

Dne 15.4.2018 v 03:03 maxiroba...@gmail.com [firebird-python] napsal(a):
> Hi,
> 
> I have the next sql command
> 
> sql = 'SELECT
>     "EXPRESSIONS_COMPANY"."ID",
>     "EXPRESSIONS_COMPANY"."NAME",
>     "EXPRESSIONS_COMPANY"."NUM_EMPLOYEES",
>     "EXPRESSIONS_COMPANY"."NUM_CHAIRS",
>     "EXPRESSIONS_COMPANY"."CEO_ID",
>     "EXPRESSIONS_COMPANY"."POINT_OF_CONTACT_ID",
>     ? AS "FOO"
>     FROM "EXPRESSIONS_COMPANY"
>     WHERE ? = ?
>     ORDER BY "EXPRESSIONS_COMPANY"."NAME" ASC'
> 
> Running this sql
> cur.execute(sql, ['value', 'value', 'value'])
> 
> Raise an exception:
>   SQL error code = -804 - Data type unknown'
> 
> Of course, fdb doesn't replace params from entire sql command, just from 
> where clause.
> 
> Is this behavior the standard according to python db-api ?
> Is there another approach to accomplish using fdb without make a string 
> replacement ?
> 
> 
> Regards
> Maxi
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 

Reply via email to