Subject | Re: {Disarmed} Re: [firebird-support] I need to replace a varchar(2000) field with itself after removing the first ___ characters. |
---|---|
Author | SoftTech |
Post date | 2010-05-03T14:49:06Z |
Hi Martijn,
Bingo...
DECLARE EXTERNAL FUNCTION F_RIGHT
CSTRING(254),
INTEGER
RETURNS CSTRING(254)
ENTRY_POINT 'Right' MODULE_NAME 'FreeUDFLib';
I dropped the depending SP's, modified the function to allow 2000, re-created the SP's and it works now.
Thanks so much,
Mike
Bingo...
DECLARE EXTERNAL FUNCTION F_RIGHT
CSTRING(254),
INTEGER
RETURNS CSTRING(254)
ENTRY_POINT 'Right' MODULE_NAME 'FreeUDFLib';
I dropped the depending SP's, modified the function to allow 2000, re-created the SP's and it works now.
Thanks so much,
Mike
----- Original Message -----
From: Martijn Tonies
To: firebird-support@yahoogroups.com
Sent: Tuesday, April 27, 2010 8:17 AM
Subject: {Disarmed} Re: [firebird-support] I need to replace a varchar(2000) field with itself after removing the first ___ characters.
Hi,
> 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...
How is F_RIGHT defined? If it uses a smaller number than 2000 (the max
length of your field) for it's string parameters, you'll get an error.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
[Non-text portions of this message have been removed]