473,708 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Aggregate UDFs

The current issue of "Oracle Magazine" has an article on creating
custom aggregate functions, which naturally got me thinking about how
to do this in DB2.

I found some articles on creating custom aggregate functions in DB2,
written close to three years ago by Knut Stolze:

http://www-128.ibm.com/developerwork...309stolze.html

Mr. Stolze says in the first article that "[c]urrently, there is no
direct way to implement your own user-defined aggregate function." I'm
wondering if this still represents the state-of-the-art, or if there is
now (or will be in V9) a non-Java way to do it.

--Jeff

Jul 24 '06 #1
8 3129
jefftyzzer wrote:
The current issue of "Oracle Magazine" has an article on creating
custom aggregate functions, which naturally got me thinking about how
to do this in DB2.

I found some articles on creating custom aggregate functions in DB2,
written close to three years ago by Knut Stolze:

http://www-128.ibm.com/developerwork...309stolze.html

Mr. Stolze says in the first article that "[c]urrently, there is no
direct way to implement your own user-defined aggregate function." I'm
wondering if this still represents the state-of-the-art, or if there is
now (or will be in V9) a non-Java way to do it.
Yes, C :-)

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jul 25 '06 #2
Ouch! :-)

Although I think I now know the answer, allow me to rephrase for the
literal-minded: Is there now or is there planned native support for
user-defined aggregate functions?

--Jeff

Serge Rielau wrote:
jefftyzzer wrote:
The current issue of "Oracle Magazine" has an article on creating
custom aggregate functions, which naturally got me thinking about how
to do this in DB2.

I found some articles on creating custom aggregate functions in DB2,
written close to three years ago by Knut Stolze:

http://www-128.ibm.com/developerwork...309stolze.html

Mr. Stolze says in the first article that "[c]urrently, there is no
direct way to implement your own user-defined aggregate function." I'm
wondering if this still represents the state-of-the-art, or if there is
now (or will be in V9) a non-Java way to do it.
Yes, C :-)

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jul 25 '06 #3
jefftyzzer wrote:
Ouch! :-)

Although I think I now know the answer, allow me to rephrase for the
literal-minded: Is there now or is there planned native support for
user-defined aggregate functions?
There is no existing "native" support for user defined aggregates in DB2
including DB2 9. W.r.t. to plans you'll have to wait for either product
announcements or get yourself a non disclosure agreement.
The IBM DBMS which presently has user defined aggregates, and has had it
for years, is Informix IDS.
Are there any specific aggregates you're looking for?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jul 25 '06 #4
jefftyzzer wrote:
Ouch! :-)

Although I think I now know the answer, allow me to rephrase for the
literal-minded: Is there now or is there planned native support for
user-defined aggregate functions?
Now (or V9): not that I'm aware of.
Planned: yes.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Jul 25 '06 #5
Serge Rielau wrote:
>Mr. Stolze says in the first article that "[c]urrently, there is no
direct way to implement your own user-defined aggregate function." I'm
wondering if this still represents the state-of-the-art, or if there is
now (or will be in V9) a non-Java way to do it.

Yes, C :-)
Actually, this aggregation stuff was originally developed in C. I ported it
to Java for the article to make it a bit simpler. Otherwise, I would have
had to explain shared memory etc.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Jul 25 '06 #6
Knut Stolze wrote:
Planned: yes.
Let me rephrase that: it is a known requirement and the DB2 developers are
thinking about implementing it.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Jul 25 '06 #7
I'm not looking for any specific aggregate functions, I just thought
(think) it's a very cool capability (native or otherwise) and wanted to
look at it further. Thanks also for the reminder on Informix's
capabilities--I worked there back in the Finnochio/Dex/Stonebraker
days, and am heartened by IBM's continued support for--and development
on--the product.

--Jeff

Serge Rielau wrote:
jefftyzzer wrote:
Ouch! :-)

Although I think I now know the answer, allow me to rephrase for the
literal-minded: Is there now or is there planned native support for
user-defined aggregate functions?
There is no existing "native" support for user defined aggregates in DB2
including DB2 9. W.r.t. to plans you'll have to wait for either product
announcements or get yourself a non disclosure agreement.
The IBM DBMS which presently has user defined aggregates, and has had it
for years, is Informix IDS.
Are there any specific aggregates you're looking for?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jul 25 '06 #8
jefftyzzer wrote:
I'm not looking for any specific aggregate functions, I just thought
(think) it's a very cool capability (native or otherwise) and wanted to
look at it further. Thanks also for the reminder on Informix's
capabilities--I worked there back in the Finnochio/Dex/Stonebraker
days, and am heartened by IBM's continued support for--and development
on--the product.
No contest on the usefulness of the feature. :-)
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jul 25 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2352
by: Andrew Mayo | last post by:
There is something very strange going on here. Tested with ADO 2.7 and MSDE/2000. At first, things look quite sensible. You have a simple SQL query, let's say select * from mytab where col1 = 1234 Now, let's write a simple VB program to do this query back to an MSDE/2000 database on our local machine. Effectively, we'll
4
1932
by: Pete H | last post by:
Hi All; I'm trying to get some of the samples that are amply illustrated in multiple docs to work. When I try to create a Warehouse Center view "...for MQ Series messages" or use the UDF wizard in Development Center, I get the following error/warning: ------------------------------------------------------------------------- MQSeries Integration Functions could not be found on the target database. To run the DB2 table UDFs built by this...
7
1582
by: Rhino | last post by:
I am updating some Java UDFs from DB2GENERAL to DB2JAVA as suggested in the manuals for DB2 Version 8 but I'm having problems with setSQLstate() and setSQLmessage(). If I'm reading the manuals correctly, they are only supported in UDFs that use DB2GENERAL. Is that right? If it is, is there any equivalent to these methods for DB2JAVA UDFs? I'd really like to be able to return a message and SQLState of my own choosing. (I know that I...
6
3077
by: Larry Menard | last post by:
Folks, I know that DB2 does not (yet?) support this, but I wonder if anyone can suggest a work-around. I've seen article http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0504greenstein/, which was very helpful for developing the scalar functions I needed, but it does not cover how to emulate aggregate functions. And I've seen Knut's dW article...
1
2727
by: Najib Abi Fadel | last post by:
Hi i have an ordered table of dates let's say: 1/1/2004 8/1/2004 15/1/2004 29/1/2004 5/2/2004 12/2/2004
3
3339
by: Raghu | last post by:
Hello all, Can somebody help me hopw to resolve teh probelm of aggregate initialisation in c++. Her eis the piece of code. #include<stdio.h> class MyTest { public:
2
6112
by: Ian825 | last post by:
I need help writing a function for a program that is based upon the various operations of a matrix and I keep getting a "non-aggregate type" error. My guess is that I need to dereference my pointers, but I'm not sure. Please help. The code: void equate(matrix *A, matrix *B) { int i, j; assert(A.row_dim == B.col_dim && A.col_dim == B.col_dim); for(i=0; i < A.row_dim; i++) for(j=0; j < A.col_dim; j++)
0
1400
by: Helmut Tessarek | last post by:
Hi everybody, I've written some UDFs to generate passwords within DB2. They are compatible to the functions that are used in Apache's htpasswd utility. Maybe someone can use them. http://sourceforge.net/project/showfiles.php?group_id=103064&package_id=110695 The UDFS are
6
4854
by: Carsten | last post by:
Hello Folks, I encountered a problem with SQL server 2000 and UDFs. I have a scalar UDF and a table UDF where I would like the scalar UDF to provide the argument for the table UDF like in: SELECT * FROM
0
8697
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9159
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7925
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5939
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4713
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.