Subject | Re: [Firebird-Architect] Re: IN LIST |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2006-12-03T15:15:58Z |
paulruizendaal wrote:
Both collections and temp-tables that you suggested can't handle ranges
well.
Inserting all ranges in a collection or temp-table is not the way to go...
Most of times the list will be passed through DSQL, so the user can
construct a "INSERT INTO temp-table SELECT... BETWEEN/IN" and the SP
will SELECT from the temp-table but...
If the user is using a preprocessor (SQLJ, for example), he can't
construct the BETWEEN/IN, so it's again the same problem, static vs
dynamic queries.
Adriano
> --- In Firebird-Architect@yahoogroups.com, Adriano dos SantosOracle collections and record types are great things...
> Fernandes <adrianosf@...> wrote:
>
> Perhaps I am missing the point you are trying to make, but I have two
> comments:
>
> 1. Your concept of LIST seems to resemble Oracle collections. Like
> with Oracle collections, if you have a variable of type LIST, why
> would you need additional syntax in the DML?
>
> 2. Wouldn't your purposes be already served with the GTT feature we
> already have?
>
> create temporary table ids(i integer);
>
> insert into ids (select val from ...); // or whatever other code to
> fill ids programmatically
>
> select * from mytable where idx in (select * from ids);
>
> In summary, in my view we should look at implementing the concept of
> collections in PSQL (of which GTT's are a form) and not look at a
> specific, limited form of it.
>
Both collections and temp-tables that you suggested can't handle ranges
well.
Inserting all ranges in a collection or temp-table is not the way to go...
Most of times the list will be passed through DSQL, so the user can
construct a "INSERT INTO temp-table SELECT... BETWEEN/IN" and the SP
will SELECT from the temp-table but...
If the user is using a preprocessor (SQLJ, for example), he can't
construct the BETWEEN/IN, so it's again the same problem, static vs
dynamic queries.
Adriano