Subject Re: I need to replace a varchar(2000) field with itself after removing the first ___ characters.
Author kajtarl
Hi,

you can try this type of declaration (if you use FreeUDFLib), the same entry point, but longer parameters:

DECLARE EXTERNAL FUNCTION f_BigRight
CSTRING(2048), INTEGER
RETURNS
CSTRING(2048) FREE_IT
ENTRY_POINT "Right" MODULE_NAME "FreeUDFLib.dll";

and use f_BigRight instead of f_Right.
The same can be done with other string functions, and even longer parameters.

Regards

Laszlo Kajtar


--- In firebird-support@yahoogroups.com, "SoftTech" <miket@...> wrote:
>
> Greetings All,
>
> I have tried both SUBSTR() and F_RIGHT() both of which return an error:
> arithmetic exception, numeric overflow, or string truncation
>
> For example if I try this simple select in Database Workbench I receive the
> error.
>
> SELECT F_RIGHT(SYSTEM_NOTE, 1000)
> FROM ACCT_TRAN_DETAIL_TASK
> WHERE ACCT_TRAN_ID = :V_ACCT_TRAN_ID
> AND ACCT_TRAN_DETAIL_ID = :V_ACCT_TRAN_DETAIL_ID
> AND ACCT_TASK_ID = :V_ACCT_TASK_ID
>
> The field is a varchar(2000) field and contains carriage returns and line
> feeds.
>
> Any help appreciated...
>
> Here is an example of the text contained in the field
>
> 2/15/2010 4:57 PM: Sent to Shawnee, KS Third Judicial District Court,
> awaiting response.
>
> 2/17/2010 11:58 AM: Received response from Shawnee, KS Third Judicial
> District Court.
>
>
> The following submission error was returned:
> Submission Line: This client account has already been used with 09L XXXXXX
> Error: The filing fee should be $37.00(+$10.00) not 0.00 $84.00.
>
> The task was automatically reset to scheduled.
>
> 2/24/2010 5:04 PM: Sent to Shawnee, KS Third Judicial District Court,
> awaiting response.
>
> 2/25/2010 2:36 PM: Received response from Shawnee, KS Third Judicial
> District Court.
>
>
> The following submission error was returned:
> Submission Line: This client account has already been used with 09L XXXXXX
> Error: The filing fee should be $37.00(+$10.00) not 0.00 $84.00.
>
> The task was automatically reset to scheduled.
>
> 3/5/2010 6:36 PM: Sent to Shawnee, KS Third Judicial District Court,
> awaiting response.
>
> 3/8/2010 1:48 PM: Received response from Shawnee, KS Third Judicial District
> Court.
>
>
> The following submission error was returned:
> Submission Line: This client account has already been used with 09L XXXXXX
> Error: The filing fee should be $37.00(+$10.00) not 0.00 $84.00.
>
> The task was automatically reset to scheduled.
>
> 3/10/2010 4:29 PM: Sent to Shawnee, KS Third Judicial District Court,
> awaiting response.
>
> 3/11/2010 8:43 AM: Received response from Shawnee, KS Third Judicial
> District Court.
>
>
> The following submission error was returned:
> Submission Line: This client account has already been used with 09L XXXXXX
> Error: The filing fee should be $37.00(+$10.00) not 0.00 $84.00.
>
> The task was automatically reset to scheduled.
>
> 3/16/2010 11:07 AM: Sent to Shawnee, KS Third Judicial District Court,
> awaiting response.
>