Subject RE: [firebird-support] Everything but last character
Author Rick Debay
Never mind, the second version works. The error was due to a
parenthesis issue.

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Rick Debay
Sent: Thursday, January 14, 2010 12:25 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Everything but last character

SELECT
t.DATA,
SUBSTRING(LTRIM(RTRIM(t.DATA)) from 1 FOR
STRLEN(LTRIM(RTRIM(t.DATA))-1),
SUBSTR(LTRIM(RTRIM(t.DATA)), 1, (STRLEN(LTRIM(RTRIM(t.DATA))-1)))
from
TBL t

I'm trying to get all the characters in a field except for the last one.
The first attempt using 'SUBSTRING' returns an error that the token
'STRLEN' after 'FOR' is unknown.
The second one says 'expression evaluation not supported.'

How can I accomplish this?

Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.