Re: Searching/Estracting numerical data



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
.



Relevant Pages

  • Re: Missing Daigrams
    ... post named "VB6 SP6 problem with SQL 2000 Enterprise ... Manager" in the newsgroup microsoft.public.vb.bugs. ... (You might need winzip to extract files/cabs) ...
    (microsoft.public.sqlserver.tools)
  • Re: Epicor - Vantage product
    ... PICK system...do you know anything about this...I am trying to extract the data into SQL so we can qry the old records. ... Depending on the release of UV that you're running, you should have a perfectly good SQL engine available in UV. ... consulting help can be provided to get the data flattened and extracted. ... Systems Theory internet music project links: soundclick garageband "Soundtracks For Imaginary Movies" CD released Dec 2004 "Codetalkers" CD coming end of 2005 NP: nothing. ...
    (comp.databases.pick)
  • Re: Sql Server 2005 Setup will not run
    ... I got the setup program from my MSDN subscription and extracted the ISO ... contents to a local directory. ... Did you extract both CD1 and CD2? ... Links for SQL Server Books Online: ...
    (microsoft.public.sqlserver.tools)
  • Optimising Database Calls
    ... I have an ASP page that makes a vml/svg graph out of data. ... Dim command As New SqlClient.SqlCommand ... 'Code here to extract data and plot one section of the graph ... there a way to keep the same command object and keep changing the SQL? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Wildcards in Calculations
    ... now I have all this SQL ... crap floating around in my head, and I need to make a new FMP layout ... I need to extract the number from the left up to the space or the x. ... running around in circles in my head... ...
    (comp.databases.filemaker)