Home » SQL & PL/SQL » SQL & PL/SQL » REMOVING LAST 4 CHARACTERS FROM STRING( IMPORTANT ) (ORACLE 10G, WINDOWS)
REMOVING LAST 4 CHARACTERS FROM STRING( IMPORTANT ) [message #289003] Wed, 19 December 2007 04:43 Go to next message
jheds
Messages: 3
Registered: July 2007
Location: pune
Junior Member
HI ,

I WANT TO REMOVE THE LAST 4 CHARACTERS FROM A SRTING.

FOR EXAMPLE STRING = AMITJH
THE OUT PUT I WANT IS : AM.

THE LAST 4 CHARACTERS SHOULD NOT APPEAR.

PLEASE HELP. ITS URGENT.

THANKS.
Re: REMOVING LAST 4 CHARACTERS FROM STRING( IMPORTANT ) [message #289011 is a reply to message #289003] Wed, 19 December 2007 04:56 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
- Posting in all Caps is considered shouting and is rude.
- Everyone's post is important
- If it is urgent you should have started earlier

This is basic sql and can be found in the manuals. Go to tahiti.oracle.com and search for substr
Re: REMOVING LAST 4 CHARACTERS FROM STRING( IMPORTANT ) [message #289045 is a reply to message #289003] Wed, 19 December 2007 06:03 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And we already told you this (about urgent and so on) in your 2 first posts.
Aren't you able to follow the rules?

Regards
Michel

Re: REMOVING LAST 4 CHARACTERS FROM STRING( IMPORTANT ) [message #289053 is a reply to message #289045] Wed, 19 December 2007 06:24 Go to previous message
gauravsunil
Messages: 68
Registered: August 2007
Location: bhubaneswar
Member
try it
select substr('sunilgaurav',0,(length('sunilgaurav')-4)) from dual;

Regards
Sunil Gaurav
Previous Topic: DBMS_Scheduler
Next Topic: Date Selection
Goto Forum:
  


Current Time: Thu Dec 08 20:16:43 CST 2016

Total time taken to generate the page: 0.31977 seconds