<tfoot id='MhtsM'></tfoot>
    • <bdo id='MhtsM'></bdo><ul id='MhtsM'></ul>

  • <small id='MhtsM'></small><noframes id='MhtsM'>

  • <i id='MhtsM'><tr id='MhtsM'><dt id='MhtsM'><q id='MhtsM'><span id='MhtsM'><b id='MhtsM'><form id='MhtsM'><ins id='MhtsM'></ins><ul id='MhtsM'></ul><sub id='MhtsM'></sub></form><legend id='MhtsM'></legend><bdo id='MhtsM'><pre id='MhtsM'><center id='MhtsM'></center></pre></bdo></b><th id='MhtsM'></th></span></q></dt></tr></i><div id='MhtsM'><tfoot id='MhtsM'></tfoot><dl id='MhtsM'><fieldset id='MhtsM'></fieldset></dl></div>
    1. <legend id='MhtsM'><style id='MhtsM'><dir id='MhtsM'><q id='MhtsM'></q></dir></style></legend>

        从字符串 sql server 中删除数字

        时间:2023-10-10

          <tfoot id='sgroe'></tfoot>
          <i id='sgroe'><tr id='sgroe'><dt id='sgroe'><q id='sgroe'><span id='sgroe'><b id='sgroe'><form id='sgroe'><ins id='sgroe'></ins><ul id='sgroe'></ul><sub id='sgroe'></sub></form><legend id='sgroe'></legend><bdo id='sgroe'><pre id='sgroe'><center id='sgroe'></center></pre></bdo></b><th id='sgroe'></th></span></q></dt></tr></i><div id='sgroe'><tfoot id='sgroe'></tfoot><dl id='sgroe'><fieldset id='sgroe'></fieldset></dl></div>
            <legend id='sgroe'><style id='sgroe'><dir id='sgroe'><q id='sgroe'></q></dir></style></legend>

              <tbody id='sgroe'></tbody>

            1. <small id='sgroe'></small><noframes id='sgroe'>

                  <bdo id='sgroe'></bdo><ul id='sgroe'></ul>
                  本文介绍了从字符串 sql server 中删除数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个大型数据库,我想在其中进行部分字符串搜索.用户将输入字符:JoeBloggs.

                  I have a large database in which I want to do a part string search. The user will enter characters: JoeBloggs.

                  为了争论,如果我在数据库中有一个名字Joe 23 Blo Ggs 4.我想删除 A-Z 以外的名称中的所有内容.

                  For arguments sake if I had a name Joe 23 Blo Ggs 4 in the database. I want to remove everything in the name other than A-Z.

                  我有 REPLACE(Name, ' ','') 函数来删除空格和 UPPER() 函数来将名称大写.

                  I have the REPLACE(Name, ' ','') function to remove spaces and the UPPER() function to capitalize the name.

                  是否有更有效的快速方法可以通过正则表达式来替换 A-Z 以外的任何内容.我无法更改数据库中的值.

                  Is there a more efficient fast way maybe by terms of regex to replace anything other than A-Z. I cannot change the values in the database.

                  推荐答案

                  第一个选项 -

                  您可以将 REPLACE() 函数嵌套到 32 层深.它运行得很快.

                  You can nest REPLACE() functions up to 32 levels deep. It runs fast.

                  REPLACE
                  (REPLACE
                  (REPLACE
                  (REPLACE
                  (REPLACE
                  (REPLACE
                  (REPLACE
                  (REPLACE
                  (REPLACE
                  (REPLACE (@str, '0', ''),
                  '1', ''),
                  '2', ''),
                  '3', ''),
                  '4', ''),
                  '5', ''),
                  '6', ''),
                  '7', ''),
                  '8', ''),
                  '9', '')
                  

                  第二个选项——做相反的 -

                  2nd option -- do the reverse of -

                  从数字中移除非数字数据 + SQL

                  第三个选项 - 如果你想使用正则表达式

                  3rd option - if you want to use regex

                  然后http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=27205

                  这篇关于从字符串 sql server 中删除数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:每个用户表都应该有一个聚集索引吗? 下一篇:尝试使用 SQL 身份验证登录失败

                  相关文章

                  <tfoot id='DS7xo'></tfoot>
                  <i id='DS7xo'><tr id='DS7xo'><dt id='DS7xo'><q id='DS7xo'><span id='DS7xo'><b id='DS7xo'><form id='DS7xo'><ins id='DS7xo'></ins><ul id='DS7xo'></ul><sub id='DS7xo'></sub></form><legend id='DS7xo'></legend><bdo id='DS7xo'><pre id='DS7xo'><center id='DS7xo'></center></pre></bdo></b><th id='DS7xo'></th></span></q></dt></tr></i><div id='DS7xo'><tfoot id='DS7xo'></tfoot><dl id='DS7xo'><fieldset id='DS7xo'></fieldset></dl></div>
                  • <bdo id='DS7xo'></bdo><ul id='DS7xo'></ul>

                    <legend id='DS7xo'><style id='DS7xo'><dir id='DS7xo'><q id='DS7xo'></q></dir></style></legend>

                    1. <small id='DS7xo'></small><noframes id='DS7xo'>