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, '#').
精彩评论