Home > Archive > SQL Anywhere Feedback > September 2005 > New function suggestion









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author New function suggestion
David Kerber

2005-09-27, 11:23 am

With the OLAP windowing functions in 9.0.2, it should be very easy to
add some functions to give me the "previous" and "next" values in a
given column. I can sometimes get what I need by using a MAX() function
with a window of 1 record, but there are some conditions when I haven't
been able to do this. Giving me a PREVIOUS(<fieldname> ) and NEXT
(<fieldname> ), or equivalently, LAG(<fieldname> ) and LEAD(<fieldname> )
functions would be wonderful.

I know that in database theory, there is no such thing as "previous"
record, but as soon as I apply an ORDER BY there is, and that's what I'm
asking for.

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Glenn Paulley

2005-09-27, 1:23 pm

David Kerber < ns_dkerber@ns_wraenv
iro.com> wrote in
news:MPG. 1da32c9eaca87dd9897a
4@forums.sybase.com:

> With the OLAP windowing functions in 9.0.2, it should be very easy to
> add some functions to give me the "previous" and "next" values in a
> given column. I can sometimes get what I need by using a MAX() function
> with a window of 1 record, but there are some conditions when I haven't
> been able to do this. Giving me a PREVIOUS(<fieldname> ) and NEXT
> (<fieldname> ), or equivalently, LAG(<fieldname> ) and LEAD(<fieldname> )
> functions would be wonderful.
>
> I know that in database theory, there is no such thing as "previous"
> record, but as soon as I apply an ORDER BY there is, and that's what I'm
> asking for.
>


We are aware that LAG/LEAD and FIRST/LAST are useful features (they are
both supported by Oracle) and we plan to implement them in a future release
- can't say when as yet.

--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288
David Kerber

2005-09-27, 1:23 pm

In article < Xns96DE83749CC84paul
leyianywherecom@10.22.241.106>,
paulley@ianywhere.com says...
> David Kerber < ns_dkerber@ns_wraenv
iro.com> wrote in
> news:MPG. 1da32c9eaca87dd9897a
4@forums.sybase.com:
>
>
> We are aware that LAG/LEAD and FIRST/LAST are useful features (they are
> both supported by Oracle) and we plan to implement them in a future release
> - can't say when as yet.


When you say "later release", does that mean a later release of 9.x, or
does that mean Jasper or later? I didn't know that Oracle had it; I got
the hint from DB2.

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Glenn Paulley

2005-09-27, 8:23 pm

David Kerber < ns_dkerber@ns_wraenv
iro.com> wrote in
news:MPG. 1da3489e1c4b44b99897
a5@forums.sybase.com:

> In article < Xns96DE83749CC84paul
leyianywherecom@10.22.241.106>,
> paulley@ianywhere.com says...
>
> When you say "later release", does that mean a later release of 9.x,
> or does that mean Jasper or later? I didn't know that Oracle had it;
> I got the hint from DB2.
>


This functionality will not appear in 9.x, nor is it likely that we will
get to it for the Jasper timeframe - it will likely be in a maintenance
release of 10.x.

--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com