Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Substring two varying character positions 1

Status
Not open for further replies.

ortonio

Instructor
Oct 3, 2005
1
US
I have a column that includes three values separated by the / character. For example:

izdb:train/16/jewels
izdb:train/68/zakula
izdb:train/2/emma
izdb:train/103/1234

How can I write a select query to list the middle number. My apologies if this is basic, I am a rookie at SQL and this is my first posting.

ortonio@att.net
 
Mid(Left(izdb,InStrRev(izdb,"/")-1),InStr(izdb,"/")+1)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top