Subject Re: [IBO] UDF help
Author Charles Urbina
Alan,


> silly question - do you have the udf ddl library installed?
> Alan
yes I do I have compiled this stored procedure already. I get the error only
when I tried clonning the excell formula exactly as I have it in excell.

/* This is my Excell formulas */
=IF(M2>9,TRUNC((M2-MOD(M2,10))/10)+MOD(M2,10),M2)

/** my SP *//
IF (:D4 > 9) then
D4 = SR_TRUNC((:D4-MOD(:D4,10))/10 + MOD(:D4,10),:D4); <<-- here I get the
error.

But if I do this I don't get the error but. the formula is not complete.

IF (:D4 > 9) then
D4 = SR_TRUNC(:D4-MOD(:D4,10))/10 + MOD(:D4,10); <<- Here I'm missing the
las part of the excell fomula

Charles

>
> > -----Original Message-----
> > From: Charles Urbina [mailto:curbina@...]
> > Sent: Sunday, 20 October 2002 9:04
> > To: IBObjects@yahoogroups.com
> > Subject: [IBO] UDF help
> >
> >
> > I trying to duplicate a formula that I have used in an excell sheet. now
I
> > need to use it in a stored procedure but I get an error when I compile
it.
> >
> > Error "invalid data type, length, or value Function SR_Trunc could not
be
> > matched" I also tried using F_TRUNCATE function and I get the same
result.
> >
> > /* This is my Excell formulas */
> >
> > =IF(M2>9,TRUNC((M2-MOD(M2,10))/10)+MOD(M2,10),M2)
> >
> > /* In my Stored procedure*/
> > this one gives the error.
> >
> > IF (:D4 > 9) then
> > D4 = SR_TRUNC((:D4-MOD(:D4,10))/10 + MOD(:D4,10),:D4);
> >
> > /* In my Stored procedure*/
> > when I use this line I don get an error but I don't get the correct
result
> > from the formula.
> >
> > IF (:D4 > 9) then
> > D4 = SR_TRUNC(:D4-MOD(:D4,10))/10 + MOD(:D4,10);
> >
> > Can someone help me creating a formula with IB that will generate the
same
> > result as the one in excell.
> >
> > Tia
> > Charles Urbina
> >
> >
> >
> >
> >
> >
> > __________________________________________________________________
> > _________
> > IB Objects - direct, complete, custom connectivity to Firebird or
> > InterBase
> > without the need for BDE, ODBC or any other layer.
> > __________________________________________________________________
> > _________
> > http://www.ibobjects.com - your IBO community resource for Tech
> > Info papers,
> > keyword-searchable FAQ, community code contributions and more !
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>