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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to extract strings between two special charactors

Status
Not open for further replies.

RJL1

Technical User
Oct 3, 2002
228
US
I have a sting that contains a qty (in this case 50) that I need to extract. I am having trouble trying to get just he 50 out of the string below

Code:
Quantity Received=50;Detail Row=1;

Any suggestion on how to get this value from the string. My field type is text in the DB

Thanks
RJL
 
Does each record begin with ''Quantity Received=' ?


declare @v_test varchar(50);
set @v_test = 'Quantity Received=50;Detail Row=1;'

select SUBSTRING(@v_test,19,charindex(';',@v_test) - 19)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top