Subject | Re: [firebird-support] store procedure WHERE IN |
---|---|
Author | Martijn Tonies |
Post date | 2004-06-08T09:10:39Z |
Hi,
as a parameter, it isn't.
With Firebird 1.5, the thing you CAN do, however, is something like
this:
create procedure testproc
(listOfValues varchar(200) )
returns (id integer)
as
begin
for execute statement 'select id from mytable where blah in (' ||
listofvalues || ') '
do suspend;
end
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> Is there a way to pass in a parameter for a WHERE IN caluse to aWell, not like that. "listofvalues" should be separate strings, which,
> stored proc?
>
> something like this but not this
>
> create procedure testproc
> (listOfValues ?????datatype????)
> returns (id integer)
> as
> begin
> for select id from mytable where blah IN (:listOfValues)
> do
> suspend;
> end
>
> any idea how this kind of thing could be done?
as a parameter, it isn't.
With Firebird 1.5, the thing you CAN do, however, is something like
this:
create procedure testproc
(listOfValues varchar(200) )
returns (id integer)
as
begin
for execute statement 'select id from mytable where blah in (' ||
listofvalues || ') '
do suspend;
end
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com