Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 12th, 2006, 07:21 AM
Registered User
 
Join Date: Oct 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old October 16th, 2006, 11:06 PM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

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

--Jeff Moden
 
Old October 25th, 2006, 03:59 AM
Registered User
 
Join Date: Oct 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Jeff Moden

Its statrted working.. Thank you a lot..

with regards
Fraijo

 
Old October 25th, 2006, 09:55 PM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract part of String carrie09 Access 6 August 24th, 2007 10:04 AM
extract string from value of attribute camacho XSLT 1 August 16th, 2007 02:44 AM
Extract first numeric string blkskullwork Javascript 1 November 6th, 2006 02:37 AM
How to extract a substring from a string.... muralish MySQL 2 May 18th, 2005 06:58 AM
How to extract numerical values from string? Genuine Beginning PHP 7 August 7th, 2004 07:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.