如何删除字段开头的空格? [英] How do I remove a space at the beginning of the field?

查看:105
本文介绍了如何删除字段开头的空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个拥有1000个客户的数据库。我注意到,每隔一段时间,就会输入一个在开头就有空格的名字。这显然会弄乱字母排序。有没有办法在启动时运行一个工作,可以在客户表中搜索开头有空格的字段?如果数据以空格开头,我也很乐意阻止输入数据。以下是客户表的设置:

展开 | 选择 | Wrap | 行号

解决方案

如果你不喜欢不介意在开头和结尾删除所有空格,你可以使用Trim()函数。


我查找了Trim()函数。它似乎只是显示没有空格的值而不是实际从表中删除空格。我看到客户名称的位置在组合框中,该组合框组合了名称的每个部分以创建整个名称。如果我使用trim()函数,这仍然可以工作,并允许我开始输入一个名称,让它找到它吗?


我用来组合名称的代码如下:

展开 | 选择 | 换行 | 行号


< blockquote>你当然可以更新表格。

展开 | 选择 | Wrap | 行号


I''ve got a database that has something like 1000 customers. I''ve been noticing that every once in awhile, a name will be entered that has a space at the beginning. This obviously messes up the the alphabetical sorting. Is there a way to run a job on startup that would search through the customer table for fields that have a space at the beginning? I would also be happy with preventing the data from being entered if it start with a space. Here is the setup for the customer table:

Expand|Select|Wrap|Line Numbers

解决方案

If you don''t mind getting rid of all spaces at the beginning and end, you can use the Trim() function.


I looked up the Trim() function. It seems like all it does is show the value without the spaces instead of actually removing the spaces from the table. The place where I see the customer names is in a combo box that combines each part of the name to create a whole name. If I use the trim() function, would this still work and allow me to start typing in a name and have it find it for me?

The code that I use to combine the names is as follows:

Expand|Select|Wrap|Line Numbers


You could certainly update the table.

Expand|Select|Wrap|Line Numbers


这篇关于如何删除字段开头的空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆