Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How extract the numbers only in SQL

How extract the numbers only in SQL

Scheduled Pinned Locked Moved Database
database
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    isroavi
    wrote on last edited by
    #1

    How extract the numbers only in the particular filed (Mobile_no). ex. data’s like mr law ( 011-2231183) House Fax:72336 6553 En Zaiadnal -202323204 I used replace but still the characters is coming raj

    J F 2 Replies Last reply
    0
    • I isroavi

      How extract the numbers only in the particular filed (Mobile_no). ex. data’s like mr law ( 011-2231183) House Fax:72336 6553 En Zaiadnal -202323204 I used replace but still the characters is coming raj

      J Offline
      J Offline
      Jerry Hammond
      wrote on last edited by
      #2

      Well, one solution would be to create table with a column (tinyint) named HouseFax in which you would place the number 72336 6553. You wouldn't have any problem extracting the number then... Pictures of the menu available at the drive-thru

      I 1 Reply Last reply
      0
      • J Jerry Hammond

        Well, one solution would be to create table with a column (tinyint) named HouseFax in which you would place the number 72336 6553. You wouldn't have any problem extracting the number then... Pictures of the menu available at the drive-thru

        I Offline
        I Offline
        isroavi
        wrote on last edited by
        #3

        thanks for your suggestion. i will try... raj

        1 Reply Last reply
        0
        • I isroavi

          How extract the numbers only in the particular filed (Mobile_no). ex. data’s like mr law ( 011-2231183) House Fax:72336 6553 En Zaiadnal -202323204 I used replace but still the characters is coming raj

          F Offline
          F Offline
          Frank Kerrigan
          wrote on last edited by
          #4

          You could soemthing like this, not very clever but it works and you could alway put it in an UDF. declare @Mob varchar(50) set @Mob = '0122-1230-123' set @Mob = REPLACE( @Mob , '-', '') set @Mob = REPLACE( @Mob , ' ', '') set @Mob = REPLACE( @Mob , '/', '') set @Mob = REPLACE( @Mob , 'T', '') set @Mob = REPLACE( @Mob , '\', '') SELECT @Mob Results -------- 01221230123 Look where you want to go not where you don't want to crash. Bikers Bible

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups