Re: Searching/Estracting numerical data
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 06 Feb 2006 23:53:52 +0100
On 6 Feb 2006 13:53:35 -0800, KR wrote:
KR
Feb 6, 1:48 pm show options
Newsgroups: microsoft.public.access.forms
From: "KR" <kra...@xxxxxxxxxx> - Find messages by this author
Date: 6 Feb 2006 13:48:00 -0800
Subject: Extract Number from Fields - SQL
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse
I am new to the SQL world, and I am trying to come up with a script
that will extract only the numerical data from a column of varchar
data type . There is not a pattern to the data entered, except that
the data that
I am looking to extract is a three digit number. If someone could
point me in the right direction that would be great.
Hi KR,
The function you would use to find where a three digit sequence in
varchar data is located is
POSINDEX ('%[0-9][0-9][0-9]%', CharData)
--
Hugo Kornelis, SQL Server MVP
.
- Follow-Ups:
- Re: Searching/Estracting numerical data
- From: Erland Sommarskog
- Re: Searching/Estracting numerical data
- References:
- Searching/Estracting numerical data
- From: KR
- Searching/Estracting numerical data
- Prev by Date: Re: Any T-SQL advice?
- Next by Date: Re: Any T-SQL advice?
- Previous by thread: Re: Searching/Estracting numerical data
- Next by thread: Re: Searching/Estracting numerical data
- Index(es):
Relevant Pages
|