Re: IDS Feature Request List (including potential new requests).
Posted in 2006
Topics: General Discussion
bozon wrote:
> Can others come up with queries that tuple comparisons and tuples in
> aggreate functions would be helpful or is it just me?
>
> Thanks
>
> Curtis "Bozon" Crowson
>
For me tuple comparison/aggregates are just syntactic sugar. I mean that
this can be just more convenient only in some cases while you can also
write a query without this new syntax.
So to make SQL simpler I would vote against this feature.
Instead I feel strong need for supporting queries like this:
Select *
From table1
Where (col1, col2) not in (
Select col1, col2
from table2
)
This cannot be simply rewritten in different way. And very often such a
construct would be useful in delete statement.
This is only my own impression that need for such queries occurs often.
I do not know how often other people needs this.
robsosno wrote:
> bozon wrote:
>
>> Can others come up with queries that tuple comparisons and tuples in
>> aggreate functions would be helpful or is it just me?
>>
>> Thanks
>>
>> Curtis "Bozon" Crowson
>>
> For me tuple comparison/aggregates are just syntactic sugar. I mean that
> this can be just more convenient only in some cases while you can also
> write a query without this new syntax.
> So to make SQL simpler I would vote against this feature.
>
> Instead I feel strong need for supporting queries like this:
>
> Select *
> From table1
> Where (col1, col2) not in (
> Select col1, col2
> from table2
> )>
> This cannot be simply rewritten in different way. And very often such a
> construct would be useful in delete statement.
>
> This is only my own impression that need for such queries occurs often.
> I do not know how often other people needs this.
Can't you use NOT EXISTS in most all cases? (there are subtle diffs
w.r.t. NULL treatment between NOT and EXISTS).
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
DB2 UDB for Linux, Unix, Windows
IBM Toronto Lab