Subject | Re: {Disarmed} Re: [firebird-support] Passing multiple values to a parameter of a stored procedure |
---|---|
Author | SoftTech |
Post date | 2008-11-10T21:14:29Z |
Thanks for the reply Helen,
Where may I find examples of these two techniques?
Thanks,
Mike
Where may I find examples of these two techniques?
Thanks,
Mike
----- Original Message -----
From: Helen Borrie
To: firebird-support@yahoogroups.com
Sent: Monday, November 10, 2008 3:07 PM
Subject: {Disarmed} Re: [firebird-support] Passing multiple values to a parameter of a stored procedure
At 06:15 AM 11/11/2008, you wrote:
>Greetings All,
>
>I'm using Firebird 1.5
>
>
>Is there anyway to pass as an input parameter these values 1,15,16 (or others) so that I can have a where clause like this?
>
> WHERE DCTBD.TBD_ID IN(:V_TBD_ID_LIST)
No. The IN() argument is specifically a list of constants.
You can pass the list in as an input string and parse it in a loop so that you process each list member in turn with an equality test and operate on the found records one at a time inside the loop.
Or you can construct an executable statement to which you concatenate your input list, and use EXECUTE STATEMENT to execute it.
./heLen
[Non-text portions of this message have been removed]