Subject Re: [Firebird-Architect] Re: Java Stored Procedures
Author Martijn Tonies
> > Having new SQL features (Stored Functions, c'mon now!), Java
> > 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

eg, (totally useless example ;): create a ISNULLTHEN_TRUE function:

create function ISNULLTHEN_TRUE (pin_value VARIANT)
returns VARIANT
as begin
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.

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Upscene Productions
Database development questions? Check the forum!