复杂(对我来说)MS Access中的INSTR问题 [英] Complex(for me) INSTR problem in MS Access

查看:136
本文介绍了复杂(对我来说)MS Access中的INSTR问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到符合我标准的多个条目。

这很好用 -

Work_Order:IIf(IIf(InStr(1,[ML]! [描述],200)> 0,Val(中([ML]![描述],

InStr(1,[ML]![描述]," 200") ,9)))> 200000000,Mid([ML]![Description],

InStr(1,[ML]![Description]," 200"),9)) />

示例结果= 200158687.我的问​​题是这个字段有多个我需要提取的数字。我的表格式有2列:名为

CRnum和Description。我需要每个Work_Order的记录

即:

CRnum Work_Order。

I am trying to find multiple entries that meet my criteria.
this works great--
Work_Order: IIf(IIf(InStr(1,[ML]![Description],"200")>0,Val(Mid([ML]![Description],
InStr(1,[ML]![Description],"200"),9)))>200000000,Mid([ML]![Description],
InStr(1,[ML]![Description],"200"),9))

Example result = 200158687. My problem is this field has more than 1 number that I need to extract. My table format has 2 columns: named
CRnum and Description. I need a record for each Work_Order
ie:
CRnum Work_Order.

推荐答案

您的选择规则是我真的很清楚。

以上样本可以用例如一个LIKE语句如下:

其中描述如''200 *''


当Description可以包含多个以空格分隔的字段时,您可以切换到使用分割字段并检查不同字词的功能。


请提供有关描述字段可能内容的更多信息。


Nic; o)
Your rules for selection aren''t really clear to me.
The above sample could be achieved using e.g. a LIKE statement as:
where Description like ''200*''

When the Description can hold multiple fields separated by spaces you could switch to using a function to split the field and inspect the different words.

Please provide more info about the possible contents of the Description field.

Nic;o)



你的选择规则对我来说并不是很清楚。

以上样本可以使用例如一个LIKE语句如下:

其中描述如''200 *''


当Description可以包含多个以空格分隔的字段时,您可以切换到使用分割字段并检查不同字词的功能。


请提供有关描述字段可能内容的更多信息。


Nic; o)
Your rules for selection aren''t really clear to me.
The above sample could be achieved using e.g. a LIKE statement as:
where Description like ''200*''

When the Description can hold multiple fields separated by spaces you could switch to using a function to split the field and inspect the different words.

Please provide more info about the possible contents of the Description field.

Nic;o)



描述字段是人们键入/复制粘贴到的文本字段。我试图提取的数字可以被任何东西分开。空格,逗号,回车等等。

我所拥有的是1条记录

CRnum和描述。

我想要结束与工作人员一样多的记录。

CRnum和WorkOrder

The Description field is a text field that people type/copy-paste into. the Numbers I am trying to extract can be seperated by anything. spaces, commas, carriage returns, etc. so,
what I have is 1 record with
CRnum and Description.
I want to end up with as many records as are workorders.
CRnum and WorkOrder


嗯,那么第一件事就是创建一个函数来提取所需的数字。

它是否有固定长度并且可以有多个?


Nic; o)
Hmm, then the first thing would be to create a function to extract the needed number.
Does it has a fixed length and can there be more than one ?

Nic;o)


这篇关于复杂(对我来说)MS Access中的INSTR问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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