× 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.



Nope, no Boolean. And no date formatting either. Those are a couple of reasons that SQL makes me crazy. In fact, I just got done extending Alan Campin's phenomenal iDate routine to add date formatting.

Joe

Can a UDF return a Boolean value? I am taking my first stab at making a UDF for SQL (after successfully writing my first stored procedure). This function would wrap up a service program procedure that returns an indicator. It looks like I might have to make the return value CHAR and check for '1' to see if the UDF is returning a 'true' value. Since SQL can handle Boolean (e.g. where exists), I was hoping the UDF could return such a value so I wouldn't need the actual SQL to say = '1'.

For example:

Want to do:
Select *
> From callrecords
Where isTollFree( ANI )

Worried I might have to do:
Select *
> From callrecords
Where isTollFree( ANI ) = '1'

I didn't have any luck in my own search, so I was hoping someone might be able to chime in. I'm at IBM i 7.1

Thanks,
Kurt Anderson
Sr. Programmer/Analyst
CustomCall Data Systems



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.