Subject Problems with Execute statement!
Author grndeveloper
I am executing some samples of 'execute statement' (to understand how
it works), and i found some problems with it when i add some
constriction (where ...).

For example, the next basic example works well :

v_TEXT = 'SELECT first 1' || ' x_usua.usua_codi from X_USUA';
execute statement v_text into :p_variable ;

Nevertheless when i execute this example the precompiler of IBExpert
give me some parser error (it seems that doesn't like the sentence
'execute statement'), it permite me execute it! (so, it works well!).

The problem is when i want to execute somthing like this :
( where nom is an input parameter of a procedure - varchar(100) )

V_C = 'where usua_desc = ' || nom;
v_TEXT = 'SELECT first 1 x_usua.usua_codi from X_USUA' || V_C;
execute statement v_text into :p_variable ;

IBExpert doesn't like the statement '=' of the 'where condition'! Do
someone know why?

And another thing!, - Nobody knows how can i codificate (add a)
condition in a string? Like this :

where x_u = 'pep';

How i can translate it to V_C = 'where x_u = 'pep'' ?¿?

Thanks to everybody! (i hope that my indian english doesn't affect so
much in communication of this problem!)