本文介绍了在MS Access查询中检查字符串模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MS Access中有以下查询

I have the following query in MS Access

SELECT CREAT.Subject, CREAT.CREAT, (IIf([CREAT.TargetDays]=".",".",Val([CREAT.TargetDays])*24)) AS TargetDays
FROM CREAT
WHERE IsNumeric(CREAT.TargetDays) AND IsNumeric(CREAT.CREAT)
ORDER BY Subject, Val([CREAT.TargetDays]);

我想检查一个名为FolderName的字段是否是一个字符串,如D18,D1等.这意味着第一个字符应为'D',紧随其后的是数字.有人可以告诉我如何做到这一点.

I would like to check if a field called FolderName is a string like D18, D1 etc.. which means the first character should be 'D' which is immediately followed by digits. Could someone please tell me how to accomplish this.

推荐答案

尝试一下

[FolderName] Like 'D[0-9]*'

这篇关于在MS Access查询中检查字符串模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 00:23