Dylan-
Something like this:
substring(acct,charindex('#')+1,charindex('.')-charindex('#'))
-----Original Message-----
From: Dylan Jones
[mailto:mssqldba-ezmlmshield-x55075185.[Email address protected]
Sent: Thursday, February 24, 2005 2:54 PM
To: LazyDBA Discussion
Subject: Working With Strings
Hi folks,
I am trying to pull out a string from within a string. For example
within the following string 'Duplicate records - see account #10092.2400
MEMORIAL PKWAY' I want to pull out the ID that follows the # and ends
with the decimal "." . Using VB this is a fairly straightforward
exercise. BOL string functions do not offer what I need to pull this
off. Any ideas?
Dylan A Jones
SQL DBA
SurfControl Inc (Scotts Valley)
w: 831 440 2568
m:831 566 3089
Get the latest news on SurfControl and our products,
subscribe to our monthly e-newsletter, SurfAdvisory at:
http://www.surfcontrol.com/resources/surfadvisory/surfadvisory_signup.as
px
*********************************************************************
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution or any action taken
or omitted to be taken in reliance on it, is prohibited and may be
unlawful. If you believe that you have received this email in error,
please contact the sender.
*********************************************************************
SurfControl Inc.
5550 Scotts Valley Drive
Scotts Valley, California 95066
831-440-2500
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]
--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.
Douglas County, Oregon
www.co.douglas.or.us
MS Sql Server LazyDBA home page