numeric part of a string

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default numeric part of a string

    Can anyone tell me how can I get the numeric part of a string .
    for example I'm using this..Select substring('walnut 2224
    kill',PATINDEX('%[0-9]%[0-9]%','walnut 2224 kill'),4)
    when I know the length of the numeric part is 4 but I want to retrieve
    regardless of the length of the numeric part and where its positioned.


    Please help me.

    Thank you.


    Merlyn MM Guest

  2. Similar Questions and Discussions

    1. string becomes numeric?
      Hi, I am trying to dump a query out into an excel. I found that a varchar datatype column will be converted to numeric in the Excel. For...
    2. How to sort a String column as Numeric?
      I have a datagrid (dgResults) that I am populating from a SQL stored procedure. After I fill my dataset (ds), I cache the dataset this way:...
    3. Parse part of string (mid string function ?)
      Can someone tell me how to parse part of a string? I can use the following: <?php $text = $_SERVER; //$PHP_SELF //(document.url); echo $text;...
    4. Problem converting array string back to numeric
      I'm afraid I don't know enough about your situation to help. How are you sending your values to ASP? It sounds to me like this is more like an ASP...
    5. Select with numeric conditions in the where part
      Try this: http://www.winnetmag.com/Articles/Index.cfm?ArticleID=21365 -- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA Author: ADO.NET and XML:...
  3. #2

    Default Re: numeric part of a string

    You don't say what database you're working with, but most have some means of working with regular expressions. Look into regular expressions for your database.

    JR

    jonwrob Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139