Sima2004 Posted August 25, 2004 Posted August 25, 2004 I need two different search functions in the same table. One of them must find all the words that contain the letters which are typed. One of them must however find the complete word that is typed. I have the first one. Can anybody helps me with the second one? Thanks,
Tripod Posted August 25, 2004 Posted August 25, 2004 Use the position function to find the word in the large field. e.g. Syntax: Position(HAYSTACK, NEEDLE,1,1) returns 2 when string value in variable NEEDLE is found starting in character position 2 of string HAYSTACK. The 1,1 part tells FM to start in position 1 and find the (1) first occurance of NEEDLE in HAYSTACK. I think there is also a simplier form that assumes one of these. Examples Position("Mississippi", "iss",1,1) returns 2 . Position("Mississippi", "iss",1,2) returns 5 . Position("Mississippi", "iss",3,1) returns 5 . Left(Name, Position(Name, " ", 1, 1)-1) returns William, when Name is a text field that contains William Smith. Right(Name, Length(Name) - Position(Name, " ", Length(Name), -1)) returns Smith . This finds the string, and returns a position within the 'haystack' where the 'needle' is found. --Tripod
Sima2004 Posted August 26, 2004 Author Posted August 26, 2004 You can find the whole word if you put == before the word that you are searching. For more information for the people with the same problem is this site a good source. http://www.quepublishing.om/articles/article.asp?p=174333&seqNum=2 Thanks Tripod any way.
-Queue- Posted August 26, 2004 Posted August 26, 2004 Note that == will give you ONLY the exact text entered and nothing else. So if you are looking for Suzuki 4x4 and you enter ==Suzuki, you will not find the 4x4 record, only records where the field equals 'Suzuki' and nothing else.
The Shadow Posted August 27, 2004 Posted August 27, 2004 Just to chime in, using a search of =Suzuki will find only exact words, so "Suzuki 4x4" will be found, but not "Suzukini".
-Queue- Posted August 27, 2004 Posted August 27, 2004 Suzukini sounds like it should be Suzucchini anyway.
Recommended Posts
This topic is 7392 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now