Post
by laschapas » Mon Sep 20, 2010 3:25 pm
Hi all,
Here is a variation to the query I posted on the 14 May 2009 under the subject "List all references to a particular source document" First a recap on what I said then:-
To give quick access to all references to a particular source document use the following query. The document code will be the one found under the "Code" column of the "Source documents" window and will be unique to your database. It could be a particular church baptism records, or a census year, or what your great aunt told you. Simply replace the number 16 with your source document code. Copy the example below to a notepad and save with a .sql extension, then load it into the SQL Query by clicking the "Load from file" icon under File on the SQL Query window.
--List Family/Person record, type, code, field name & notes for Source Document 16
SELECT S.RecordType, S.RecordCode, S.FieldName, S.Notes
FROM Sources S, Documents D
WHERE S.Document = D.Code AND D.Code = 16
ORDER BY S.RecordCode
The following variation adds the these extra tests:-
Only search family record types.
Look for the word "eureka" missing from the notes field.
The word "eureka" is case sensitive. You can change the word "eureka" for any other word or string, (you may test for "not shure about this" etc), that you expect to find in your notes. Remove the NOT before the LIKE to find notes fields that do contain the word "eureka".
SELECT S.RecordType, S.RecordCode, S.FieldName, S.Notes
FROM Sources S, Documents D
WHERE S.Notes NOT LIKE '%eureka%' AND S.RecordType LIKE '%F%' AND S.Document = D.Code AND D.Code = 16
ORDER BY S.RecordCode
Hope you find this useful,
John Wood