如何删除access中空格后面的所有内容
我有一个带有值的表->列名字:
Juan
Manuel l.
Richard Wit
我正在尝试执行一个查询,该查询返回
Juan
Manul
Richard
我想在空格后消除的值。
I have a table->column first-name with values:
Juan
Manuel l.
Richard Wit
I'm trying to do a query that return
Juan
Manul
Richard
I want to eliminate after a space.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
假设您需要 SQL,请尝试
在 VBA 中它会类似,因为 Mid() 和 InStr() 的工作方式与 Access-SQL 中完全相同
,但是,最好将名字和姓氏存储在单独的字段中,这样您就可以不必在 SQL 中做这种花招。
Assuming you want SQL, try
In VBA it would be similar, since Mid() and InStr() work exactly the same as in Access-SQL
Really, though, it would be better to just store first and last name in separate fields so you don't have to do this sort of finagling in the SQL.
请记住,运行此命令的效率很低,因为您将针对查询中的每条记录执行 VBA 函数。根据您使用它的方式,您可能希望查询返回完整字段并在事后进行处理。
Keep in mind that running this will be inefficient since you will be executing VBA functions against every record in your query. Depending on how you are using this, you may want to have the query return the full field and do the processing after the fact.