InStr()函数需要帮助 [英] help needed with InStr() function

查看:88
本文介绍了InStr()函数需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将文本字段ex:(10.00" od x 7.50" id)拆分为2个字段,将所有内容放在x之前。进入一列,一切进入另一列。我能够使用Left()和Mid()函数实现这一点。但是我遇到了一个问题,并非所有的字段都有x字段。一些只有一个维度ex:(3.50od)而Mid()函数将其返回到第二列,如果没有x,我需要第二列为Null。这就是我到目前为止

I''m trying to split a text field ex: (10.00" od x 7.50" id) into 2 fields putting everything before the "x" into one column and everything after into another. I was able to achieve that using the Left() and Mid() functions. But I''ve run into a problem not all of the fields have an "x" some just have one dimension ex: (3.50" od) and the Mid() function returns that into the 2nd column, I need that 2nd column to be Null if there is no "x". This is what i have so far

展开 | 选择 | Wrap | 行号

推荐答案

尝试这样的事情,这样,如果存在X,则将每一侧分配给一个值,否则你只需要取整个值。

Try something like this instead, this way you assign each side to a value if an X exists, or else you just take the whole value.

展开 | 选择 | Wrap | 行号


我可以将简单表达式形式放入查询中吗?
What would that be in simple expression form that I can put into my query?


对不起让我以字段名称的形式出现:

Sorry let me put this in the form of a field name:

展开 | 选择 | Wrap | 行号


这篇关于InStr()函数需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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