× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Just a word of warning about using SQL UDFs.  We implemented Birgitta's
example http://archive.midrange.com/rpg400-l/200606/msg00263.html and a
query, we added it to, slowed by an order of about 10 times.  Not
Birgittas fault from her example but I believe it's the way the system
implements the actual code behind SQL UDFS.   Putting the raw code from
her UDF into the statement (even though it made the statement longer)
was such an improvement that I doubt we will use a SQL UDF ever again.


We have not implemented RPGLE UDFs yet to see how they stack up. 

By the way, the UDF had to be called about 7 times with in this one
statement and the total number of records estimated to be processed was
around 40,000.  The job was stacking up the IO on QSYS2/QSQPTABL at well
over 10,000,00.  

Thanks, Matt



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Thursday, June 29, 2006 6:22 AM
To: Midrange Systems Technical Discussion
Subject: Re: AW: SQL - Calculate the number of hours between 2
timestamps

I suppose one could write their own bif.  Although then it would be a
UDF.
http://faq.midrange.com/data/cache/185.html

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.