Subject Re: [IBO] interbase udflib vice mer udflib
Author Jay
Helen Borrie wrote:
>
> At 05:22 PM 18-02-01 +1300, you wrote:
> >Helen Borrie wrote:
> > >
> > > At 04:30 PM 18-02-01 +1300, you wrote:
> > >
> > > >The reason why I had a look at mer's udflib is I need a
> 'diffdate'
> > > which
> > > >I did not find so far elsewhere. I need the number of days
> between
> > > any
> > > >two dates as in 'diffdate = abs(date1 - date2)';
> > >
> > > You don't need a UDF for this - you can do it in DSQL with SQL
> > > arithmetic and the shipped abs() UDF:
> > >
> > > select <fieldlist>, abs(date1 - date2) as diffdate from aTable
> > >
> > > This returns a double which is in days.
> >
> >Thank you for the hint, but I need it in a stored procedure.
>
> So why can't you do this in a stored procedure?
>
> create procedure whatever
> as
> declare <all sorts of variables>
> ...;
> declare variable DateDiff: double;
> begin
> for select <fieldlist>, abs(date1 - date2) from aTable
> into <all sorts of variables>, :DateDiff
> do
> begin
> blah blah;
> ...
> end
> end
>
> >Just tried
> >it with 'IBConsole' and it appears to work, but the confusing part
> came
> >from ???'IBExpert 1.0.068'??? and its stored procedure debugging
> tool,
> >which obviously is slightly flawed.
>
> Well, the IBExpert people watch this list - what happened in the
> debugging tool?
>
> Cheers,
> Helen

You are right there Helen. Now, it works for me the way I need it. :)

Try as an exercise to debug your procedure in 'IBExpert' and you will
get stuck.

The 'Expert' after all does not seem to be as much experts as they would
like to be. At least they should not attempt to charge professional
licensing fees for an immature product!

Even worse. They better let go of the very alienating idea to force the
user to have software bound to a particular machine! In a large
corporate machines change and/or move but not necessarily the person(s)
that still do(es) the same job. Database design that is.

I am trailing 'IBExpert' since a few days. It's an interesting tool yet
it still has miles to go.

Cheers

Johannes