Subject Re: [firebird-support] execute statement and in(variable)
Author Martijn Tonies
Hello Olaf,

> The follow code doesn't work:

Any message?

> Declare statement1 as string;
>
> Statement1 = "select abc from tabc where x =" || :inputparameter || " into
> :iabc "

You cannot have the INTO clause inside this string.

> For Execute statement :statement1

INTO :iabc

> Do begin
> .
> end
>
> When I take the "for" into the statement-string, it doesn't work too.

Of course not.

> The reason for this statement is an input parameter (string) with a list.
> (100, 200, 300). This is also my second question:
>
> The in(..) statement doesn't work,

How "doesn't" it work?

>if I delivered an internal variable so
> for example:
>
> For select a from abc where b in (:inputparametervariable). But this works
> fine: For select a from abc where b in (100, 200, 300).

Corrent, IN ( ... ) cannot work with a variable cause a variable is a single
value,
not a text string. With [FOR] EXECUTE STATEMENT this should work fine.

> Please, can you give me a tip? The question 1 is described in the
> firebird-documentation, but it doesn't work.

Read the syntax again ;-)

>I don't like to set more
> input-parameters for my procedure, therefore this stringlist.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com