Search for label not in entry Request

Hey @lwetzel

Thanks for using Codebook and posting to the discussion forum with this question.

It isn’t currently possible to perform advanced search queries (such as NOT) directly within the Codebook search bar, although improving the search capability to be more flexible and include some of these advanced query capabilities is something that we have considered in the past and may be nice to include in Codebook in the future.

One recommendation I do have which would work currently is using a program called DB Browser for SQLite to open and query your encrypted Codebook database.

Disclaimer: Don’t modify your Codebook database outside of the Codebook interface as changes will not be picked up by Codebook’s tracking mechanism and won’t propagate to other copies of Codebook when syncing. The query in these steps only reads from the encrypted Codebook database which is safe to do

Here are the steps:

  1. Download the latest version of DB Browser for SQLite using the Download tab from the page linked above. Install it on your system.
  2. Launch DB Browser for SQLite and access File menu > Open Database, open your strip.db encrypted Codebook database file at the location [1] – Enter your Codebook Master Password when prompted.
  3. Once your encrypted database opens, select the Execute SQL tab near the top of the window. Paste this query in the text box and click the “play button” to execute the query:

This query is incorrect, see below for the corrected query: Search for label not in entry Request - #7 by mmoore

SELECT DISTINCT(name) FROM entries e
INNER JOIN fields f ON f.entry_id = e.id
WHERE f.type_id <> (SELECT id FROM types WHERE name = 'Validated')
  1. This will provide you with a list of Entry names which don’t have a Validated label present. If you’d prefer you can export the results from he query within DB Browser for SQLite to a CSV by following the steps here: Save query results as csv - #3 by justinclift

[1] Codebook encrypted database locations:

Windows:

%APPDATA%\Zetetic LLC\Strip\strip.db

macOS:

~/Library/Group Containers/PD7G6HRMGV.net.zetetic.STRIP/Strip/strip.db

1 Like