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