如何解决sql表中的空间问题错误?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何解决sql表中的空间问题错误?相关的知识,希望对你有一定的参考价值。

my query

我在sql服务器上进行查询,帮助我删除列中的空格(Name_Arabic)回合它没有帮助我,我使用另一个查询来拆分列我可以在这个查询中解决这个问题???

我拆分列的代码

SELECT        Name_Arabic,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_10
                            WHERE        (Ordinal = 1)) AS Col1,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_9
                            WHERE        (Ordinal = 2)) AS Col2,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_8
                            WHERE        (Ordinal = 3)) AS Col3,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_7
                            WHERE        (Ordinal = 4)) AS Col4,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_6
                            WHERE        (Ordinal = 5)) AS Col5,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_5
                            WHERE        (Ordinal = 6)) AS Col6,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_4
                            WHERE        (Ordinal = 7)) AS Col7,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_3
                            WHERE        (Ordinal = 8)) AS Col8,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_2
                            WHERE        (Ordinal = 9)) AS Col9,
                         (SELECT        Part
                            FROM            dbo.CustomStringSplit(dbo._2.Name_Arabic, ' ') AS CustomStringSplit_1
                            WHERE        (Ordinal = 10)) AS Col10
答案

有人帮助我这个答案,我希望它能帮助任何人寻找类似的东西

UPDATE yourtable SET Name_Arabic = LTRIM(Name_Arabic)

以上是关于如何解决sql表中的空间问题错误?的主要内容,如果未能解决你的问题,请参考以下文章

缺少 SQL SERVER 2014 代码片段

处理 SQL Server 2012 表中的空间数据类型

错误:表中不存在列(外键引用)

如何修复存储过程 Oracle PL/SQL 的错误?

如何将excel表中的数据导入到sql server表中?

如何将 SQL Server 表中的数据附加到 Access 表中?