PresidentLincoln
asked on
DB2: Need to extract specific characters left of delimiter in string
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:
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?
I have a column that appears like this:
SBN:123456=1
SBN:1234=0
SBN:12345678=5
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Looks like my issue was caused by some NULLs. Got rid of those and it works well. Thanks!
ASKER