views:

13

answers:

1

Hi,

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

startPostIndex = indexPosition('#')
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 "*[#]*"));
+1  A: 

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

Larry Lustig
you are right! Thanks
Sana