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
 Transact-SQL (2000)
 I remodify my question'

Author  Topic 

amit82
Starting Member

12 Posts

Posted - 2007-04-17 : 08:23:40
I remodify my question'

card payment for £ 120 processed today auth code
card payaent for £145 processed today, auth code
unable to process sreamline req for £ 415 sale not
card payment for £145 processed today auth code

There are 1000 statement where in certain statements there is no space between £ and amount (£145) and in some there are (£ 145)



ideal solution
120
145
415
145

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-17 : 08:27:25
What is wrong with the suggestions you got here http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82168


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

bpgupta
Yak Posting Veteran

75 Posts

Posted - 2007-04-17 : 08:35:17
I am just giving example for one variable , you can replace the variable name with Column name


Declare @a varchar(500)
set @a ='card payment for £ 120 processed today auth code'
select substring(ltrim(substring(@a,charindex('£',@a)+1,len(@a))) ,1,charindex(' ',ltrim(substring(@a,charindex('£',@a)+1,len(@a)))))

Go to Top of Page
   

- Advertisement -