Home » SQL & PL/SQL » SQL & PL/SQL » Removing final character in a string
Removing final character in a string [message #3288] Wed, 18 September 2002 00:06 Go to next message
Rachel Fisken
Messages: 1
Registered: September 2002
Junior Member
How can you select a field of variable length minus the last character ?
Re: Removing final character in a string [message #3290 is a reply to message #3288] Wed, 18 September 2002 01:00 Go to previous message
Gilbey
Messages: 87
Registered: March 2002
Member
Try this.....
SQL> select substr('FootBall',1, (length('FootBall')-1)) "Truncated Value"from dual;

Truncated Value
--------------------
FootBal

Instead of FootBall, you can give any variable.

Hope it works for u

Gilbey
Previous Topic: Alter table statement for Oracle ORA-00904: invalid column name
Next Topic: Create Table - HELP??
Goto Forum:
  


Current Time: Mon May 06 01:29:14 CDT 2024