Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 EXTRACT a specfic part from string

Author  Topic 

sachingovekar
Posting Yak Master

101 Posts

Posted - 2009-12-15 : 03:06:33
Hi,

I have two type of strings in table.
Declare @string1 varchar(100)
Declare @string2 varchar(100)
set @string = 'ALU (A4XHBM1) DFLTGRP(EORGA)'
set @string = 'CO (A4XHBM1)'

I want the output to be
A4XHBM1
A4XHBM1

Regards,
Sachin

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-12-15 : 03:29:26
See if this helps
http://sqlblogcasts.com/blogs/madhivanan/archive/2009/11/18/parsing-a-string.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -