-- FindAlmostEverywhere-Search_Simple.sql
/*
2014-10-23 Tom Holden ve3meo

Full text search query on the FTS table "xFTStable" built by the script
 FindAlmostEverywhere-Build_FTS_table.sql from most user-editable text fields
 in the current RootsMagic database. 

It pops up a window for the search term to be entered. This term can be simple 
 or complicated with options described at
 http://www.sqlite.org/fts3.html#section_3. 

It returns the content of the field matching the search which cannot be edited 
plus the field name, table name and row number in that table in which the match
was made. That info can help locate the cell in the original table where it 
can be edited in the SQLite manager or located in RootsMagic and edited there. 

Note that the FTS table will not reflect changes until it is rebuilt.

Different search queries can be run without rebuilding the FTS table.

Requires SQLite Expert Personal with unifuzz.dll extension for fake RMNOCASE collation
 or equivalent SQLite manager with support for runtime parameters.

*/

SELECT * 
FROM xFTStable 
WHERE xFTStable 
MATCH $SearchTerm
;

-- Re-execute as often as needed. SQLite Expert remembers the last $SearchTerm

