Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UPDATE itemNotes
- SET
- note = SUBSTR(note, 0, INSTR(LOWER(note), 'sometext')) || 'abc' || SUBSTR(note, INSTR(LOWER(note), 'sometext')+sometext_len)
- WHERE
- INSTR(LOWER(note), 'sometext') >= 0;
- While (SELECT * FROM itemNotes WHERE note like "%sometext%") >1
- UPDATE itemNotes
- SET
- note = SUBSTR(note, 0, INSTR(LOWER(note), 'sometext')) || 'abc' || SUBSTR(note, INSTR(LOWER(note), 'sometext')+sometext_len)
- WHERE
- INSTR(LOWER(note), 'sometext') >= 0;
- END
- WITH b(x,y) AS
- (
- SELECT 1,2
- UNION ALL
- SELECT x+ 1, y + 1
- FROM b
- WHERE x < 20
- ) SELECT * FROM b;
- There is SOmetext and also somETExt and more SOMETEXT and even more sometext
- There is abc and also abc and more abc and even more abc
- 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
- );
- UPDATE itemNotes
- SET
- note = SUBSTR(note, 0, INSTR(LOWER(note), 'sometext')) || 'abc' || SUBSTR(note, INSTR(LOWER(note), 'sometext')+sometext_len)
- WHERE
- note LIKE "%sometext%";
- UPDATE itemNotes
- SET
- note = regex_replace('bsometextb',note,'abc')
- WHERE
- note LIKE "%sometext%";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement