I use DB Browser for SQLite to visualize and update an sqlite file.
I am able to do run a case sensitive query to update some text like this:
UPDATE itemNotes SET note = REPLACE(note , 'sometext', 'abc');
But I would like to match replace all case combinations of sometext
(e.g. sometext
, SOMEtext
, SOmeText
...)
I tried to do this :
UPDATE itemNotes SET note = REPLACE(LOWER(note), 'sometext', 'abc');
But this transform the whole content of the field note
in lower case which isn't what I want.
I also tried these query but without success:
UPDATE itemNotes SET note = REPLACE(note, BINARY 'sometext', 'abc')
UPDATE itemNotes SET note = REPLACE(note, COLLATE Latin1_General_CS_AS'sometext', 'abc')
I am doing it on the zotero.sqlite, which is created by this file (line 85). The table is created by this query
CREATE TABLE itemNotes (
itemID INTEGER PRIMARY KEY,
parentItemID INT,
note TEXT,
title TEXT,
FOREIGN KEY (itemID) REFERENCES items(itemID) ON DELETE CASCADE,
FOREIGN KEY (parentItemID) REFERENCES items(itemID) ON DELETE CASCADE
);