Subject Re: [firebird-support] only for numerics...
Author Rony Cesana
----- Original Message -----
From: "Adomas Urbanavicius" <adomas@...>
To: <firebird-support@yahoogroups.com>
Sent: Tuesday, March 14, 2006 1:45 PM
Subject: Re: [firebird-support] only for numerics...


> However, while not being interested into db design issues or similar,
> I think we could do so with stored procedure :
> something like (syntax not checked) :
> create procedure MY_SP (INPUT_STRING varchar(100))
> returns MY_NUMERIC NUMERIC(18,2)
> begin
> MY_NUMERIC = INPUT_STRING;
> when convert_error do
> MY_NUMERIC = NULL;
> suspend;
> end
>
> And then query would look :
> select * from xxx
> where
>
> (
> (SELECT MY_NUMERIC FROM MY_SP( xxx.THIS_DATE_FIELD )) > 1975
> )
>
>
> It wont be so fast though :), but no need to write udf :).
>
> Adomas


Thanks Adomas,

I had thought about that too, though it would mean generating a SP for each
field... and I think it's hardly feasible in my situation.
Still, a smart solution! ;)

Thanks a lot,
Rony