p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SQL Server 2000 (http://p2p.wrox.com/forumdisplay.php?f=20)
-   -   how to extract from a string (http://p2p.wrox.com/showthread.php?t=48931)

fraijo October 12th, 2006 07:21 AM

how to extract from a string
 
Hello

I need your help to solve this critieria. I'm looking for a solution for extract the value from a field. The exact criteria is like this..

‘Dorpsstraat 48’ = ‘48’
‘3e dwarsstraat 23’ = ‘23’
‘Singel 6-III’ = ‘6-III’
‘Dorpsstraat Singel 70’ = ‘70’

how can i do it.. can pls help me? I'm very much thankful to you if you do so..

with thanks
Fraijo

Jeff Moden October 16th, 2006 11:06 PM

SELECT RIGHT(yourcolname,CHARINDEX(' ',REVERSE(yourcolname))-1)
  FROM yourtable

--Jeff Moden

fraijo October 25th, 2006 03:59 AM

Hi Jeff Moden

Its statrted working.. Thank you a lot..

with regards
Fraijo


Jeff Moden October 25th, 2006 09:55 PM

Quote:

quote:Originally posted by fraijo
 Hi Jeff Moden

Its statrted working.. Thank you a lot..

with regards
Fraijo


You are welcome... thank you for the feedback.

--Jeff Moden


All times are GMT -4. The time now is 05:50 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.