Hold on... that's not what I meant.
What I meant is:
- The operators should be usable either _at the end_ or _at the beginning_
of the query, not in the middle
- You should be able to put SKIP before TAKE or vice-versa
- You should be able to put one at the beginning and one at the end
But the semantics are the same in either case.
Diego
On Mon, Feb 7, 2011 at 03:09, Hoang Tang <[email protected]> wrote:
> I agree with Diego that it would be nice to be able to use it in any order.
> Though I think this is more like a requirement anyway... since obviously
> there is a major different between
>
> from cat skip 4 take 4 order by name
> vs.
> from cat order by name skip 4 take 4
>
>
> On Sun, Feb 6, 2011 at 2:24 PM, Diego Mijelshon <[email protected]>wrote:
>
>> The problem with V and VI is that they introduce new reserved keywords.
>> How would you select a property named "First"?
>> It _can_ be disambiguated in the parser, but I doubt it's a good idea.
>>
>> It would be nice to be able to use the SKIP and TAKE operators in any
>> order, and either before SELECT or after ORDER BY, so client code can use
>> whatever feels more natural:
>>
>> SKIP 5 SELECT something FROM there WHERE that ORDER BY these TAKE 10
>>
>> ...could be a supported construct.
>>
>> Diego
>>
>>
>>
>> On Sun, Feb 6, 2011 at 16:56, Patrick Earl <[email protected]> wrote:
>>
>>> K, I'm going to throw a wrench in the works and add a couple options.
>>>
>>> http://en.wikipedia.org/wiki/Select_(SQL)#FETCH_FIRST_clause
>>>
>>> So, to recap:
>>>
>>> Option i: SKIPPING x TAKING y SELECT ... FROM ... WHERE ... ORDER BY ...
>>> Option ii: SKIP x TAKE y SELECT ... FROM ... WHERE ... ORDER BY ...
>>> Option iii: SELECT ... FROM ... WHERE ... ORDER BY ... SKIP x TAKE y
>>> Option iv: SELECT ... FROM ... WHERE ... ORDER BY ... SKIPPING x TAKING y
>>> Option v: SELECT FIRST x SKIP y ... FROM ... WHERE ... ORDER BY ...
>>> Option vi: SELECT TOP x SKIP y ... FROM ... WHERE ... ORDER BY ...
>>>
>>> Patrick Earl
>>>
>>
>>
>