Subject | Typeless parameters (was: Re: [Firebird-Architect] FB 2.0 Road Map) |
---|---|
Author | Martijn Tonies |
Post date | 2004-09-10T11:38:48Z |
> J> would it make more sense to have an operator (or function)That being said...
> J> that simply ditched the null?
>
> it would. That's why we have coalesce() I suppose.
>
> ditch_null() wouldn't be a bad alias for it, though. :-)
I have a question -
Internally, COALESCE etc can take any type of parameters.
Would this be possible to do for Stored Functions and Stored
Procedures. So one could create a function like:
create function DitchNull(param_in) returns ...
begin
if TypeOf(param_in) = Varchar /* or something */
then Result = coalesce(param_in, '');
else if ... etc
end
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com