Solved

Removing first and last character

Posted on 2012-12-26
3
578 Views
Last Modified: 2012-12-26
Hi All,

I need your assistance. I would like to remove the fist and last characters from 'VHT56789TYHBG'. Can anyone pls help.


Thanks in advance.

select 'VHT56789TYHBG' from dual
0
Comment
Question by:jose11au
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 250 total points
ID: 38722652
SELECT SUBSTR('VHT56789TYHBG', 2, LENGTH('VHT56789TYHBG') - 2) FROM DUAL;

Open in new window

0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 250 total points
ID: 38722653
a couple of ways...


select substr(str,2,length(str)-2),
regexp_substr(str,'.(.+).',1,1,null,1)
 from
(select 'VHT56789TYHBG' str from dual )
0
 

Author Comment

by:jose11au
ID: 38722662
Thanks so much.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question