We help IT Professionals succeed at work.
Get Started

DB2: Need to extract specific characters left of delimiter in string

Steven Ruiz
Steven Ruiz asked
on
121 Views
1 Endorsement
Last Modified: 2020-03-13
I am using Data Studio to write a query for a DB2 AIX database.  I have a small issue I'm running into.  

I have a column that appears like this:

SBN:123456=1
SBN:1234=0
SBN:12345678=5

Open in new window


I need to extract all characters, starting from the "SBN", all the way up to, but not including, the equal sign.  The numbers after "SBN" can be of varying length, so I just need the beginning of the string up until the equal sign.  What is the easiest way to accomplish this?
Comment
Watch Question
Software Developer / Database Administrator
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE