Query

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Wolfgang
Posts: 60
Joined: Tue Oct 10, 2017 12:44 pm

Query

Post by Wolfgang » Wed Jul 18, 2012 9:54 am

Hello,__I need a query to find all records with a string, for excample the string "Test", anywhere inside a field.____Field equal to "Test" will not work.____Is the a way to get my problem fixed?____Thanks__Wolfgang__

User avatar
cstrasser
Posts: 155
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Query

Post by cstrasser » Thu Jul 19, 2012 10:18 am

Hello Wolfgang,__There are a few ways to get what you want:____1. If you just need a True / False result for the presence of the string inside the field, you can create a calculated field with the expression:____"Test" $ FIELD____Which will search for an occurrence of the word Test in the field and return T if it^s there and F if not.____2. If you need to find the location of the text within the field, use the expression:____AT("Test", FIELD)____And it will return a numeric value of the location where the text value is within the field (the first occurence).____3. If you need to find the location of the Nth occurrence of a value within a field, you can use the expression____STRSEARCH("Test", FIELD, 2)____Which will tell you the location where the 2nd occurrence of Test happens in FIELD
Chris Strasser
Liveware Publishing, Inc.
Work bigger.

Wolfgang
Posts: 60
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Query

Post by Wolfgang » Thu Jul 26, 2012 4:03 pm

Hi,__when I go into pulldownmenue Database->Querry I can not choose "Test"$Field. There is only possible Field with the comparison "equal to", "greater than" and so on.__How can I add "Test"$Field as a query into the report?____Thanks__Wolfgang

User avatar
cstrasser
Posts: 155
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: Query

Post by cstrasser » Wed Aug 01, 2012 4:07 pm

You need to create a calculated field first, calling it something like Query_Selector or Selection_Calc. In the expression box, you^d put the equality check from the above post.____Then in your report^s query, you should be able to find the field Query_Selector and compare it to True or False with an Equals or Not Equals comparison.
Chris Strasser
Liveware Publishing, Inc.
Work bigger.

Post Reply