Subject | list of integers as a parameter |
---|---|
Author | steve_carter_ben |
Post date | 2006-02-14T18:12:18Z |
I'm using Delphi, IBObjects, and FB 1.5.
I want to pass a list of integers as a parameter to a stored procedure
(of course, I'll pass them as a comma-delimited string), and use them
in something like: select ... where chord_id in(...) [meaning, in my
list of values]
In Oracle, I can do this with a table function; I can pass a string
parameter like '1,3,5', and essentially put them in a table, so, in
effect, I'm doing something like ...where chord_id in(select chord_id
from chord_id_table).
So, conceptually, what I want is to be able to call a seletable stored
procedure: select tunes('1,3,5'), and the code in the procedure would
be the equivalent of: select title from tunes where tunes.chord_id in
(1,3,5).
Suggestions?
Steve
I want to pass a list of integers as a parameter to a stored procedure
(of course, I'll pass them as a comma-delimited string), and use them
in something like: select ... where chord_id in(...) [meaning, in my
list of values]
In Oracle, I can do this with a table function; I can pass a string
parameter like '1,3,5', and essentially put them in a table, so, in
effect, I'm doing something like ...where chord_id in(select chord_id
from chord_id_table).
So, conceptually, what I want is to be able to call a seletable stored
procedure: select tunes('1,3,5'), and the code in the procedure would
be the equivalent of: select title from tunes where tunes.chord_id in
(1,3,5).
Suggestions?
Steve