Re: isnumber

From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 04/23/04

  • Next message: Hugo Kornelis: "Re: Help with Query"
    Date: Fri, 23 Apr 2004 10:20:31 +0530
    
    

      hi mehran,

      if you the unwanted characters that need to be removed from the string are
    known then you can make use of "replace" function.

      ex:
      drop table multi_nos
      CREATE TABLE multi_nos ( b varchar(50))

      insert into multi_nos values ('++123-456-675')
      insert into multi_nos values ('++12-456-75')

      In this example i know that if i remove + and - then i will get the pure
    numeric value, so i can write a query as:

      select replace(replace(b, '-',''),'+','') 'b' from multi_nos

      --Vishal


  • Next message: Hugo Kornelis: "Re: Help with Query"

    Relevant Pages

    • Re: Stripping out unwanted characters
      ... Use regular expression to remove unwanted characters and then send the ... string to database. ... characters from a string. ... hoep this will help you... ...
      (microsoft.public.dotnet.framework.aspnet)
    • String filtering
      ... I've been puzzling for a little bit over a good way to filter out ... unwanted characters from a string. ... David Trudgett ...
      (comp.lang.ada)
    • Re: String[] to String
      ... See java.util.Arrays.toStringand .deepToString() ... You get a load of unwanted characters in your string if you do that. ...
      (comp.lang.java.programmer)
    • Re: Pattern Matching
      ... How to match a string containing only numbers? ... declare @s varchar ... You may want to add additional unwanted characters to the list. ... message properly in T-SQL. ...
      (comp.databases.sybase)
    • Re: stripping out ASCII chars using regexp?
      ... > I am trying to get rid of the ASCII chars from the end of a string ... Fixing this by deleting the unwanted characters is nothing but band aid. ...
      (comp.lang.perl.misc)