开发者

Is their a posIndex in MS Access Queries?

I need to write a query like SELECT substring(variable, startPosIndex, endPos) from Blah blah ;

startPostIndex = indexPositio开发者_如何学编程n('#')
endPos = lenght(variable) - 1;

So basically my query to access will be

SELECT substring(variable, indexPosition('#'), lenght(variable) - 1) from Blah blah ;

The query that I have written to get if a field has anything after a "#" in a tuple is

SELECT DISTINCT Mid(geninq.entry,InStr(geninq.entry,"#"),Len(geninq.entry)) AS Expr1
FROM geninq
WHERE (((geninq.entry) Like "*[#]*"));


I think the function you're looking for is InStr: InStr(String, '#').

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜