Subject | Re: [Firebird-Architect] IN LIST |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2006-12-03T13:30:38Z |
Arno Brinkman wrote:
numbers) are converted to the dest (in this case 'id') datatype, so
'5-10' will not be evaluated to -5.
Adriano
> Hi,My syntax is IN LIST <string>, and the items (which don't necessary is
>
>
>>>> Hence, a way to pass indeterminate number of intervals is very great:
>>>> select * from t where id in list '5-10,20-30,50'
>>>>
>>> Do we speak about lists or ranges or both? IMO, the syntax should be
>>> clear about that.
>>>
>> IMHO, I think that he speaks about a way to 'compress' the IN members
>> from the list. (But also, at the end of his message I didn't understand
>> very clear what he's saying...). On my understand the query:
>>
>> select * from t where id in list (1, 3, 5-10, 12);
>>
>> will be equivalent with
>>
>> select * from t where id in(1, 3, 5,6,7,8,9,10, 12);
>>
>
> No, it will be equivalent to:
>
> select * from t where id in(1, 3, -5, 12);
>
numbers) are converted to the dest (in this case 'id') datatype, so
'5-10' will not be evaluated to -5.
Adriano