|Subject||Re: [Firebird-Architect] Re: Java Stored Procedures|
> > Having new SQL features (Stored Functions, c'mon now!), Javaeg, (totally useless example ;): create a ISNULLTHEN_TRUE function:
> > Stored Procedures and - perhaps - .NET procedure would be
> > coolish.
> How about Delphi Stored Procedures ? :)
> > Add to that: a "variant" datatype, so you could do your own
> > wrapper around "coalesce", for example, would be even more cool.
> Explain it, please
create function ISNULLTHEN_TRUE (pin_value VARIANT)
if ((pin_value is null) and (typeof(pin_value) = TYPE_INT))
then result = 1
else if ((pin_value is null) and (typeof(pin_value) = TYPE_VARCHAR))
then result = 'T'
else result = pin_value;
All pseudo, obviously.
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Database development questions? Check the forum!