makis_best Well-Known Member Licensed User Longtime User Jun 19, 2019 #1 Hi. The "REPLACE INTO" sqlite command will work in B4A? Thank you
DonManfred Expert Licensed User Longtime User Jun 19, 2019 #2 It is part of the SQLite language. Why it should not work? Do you get any error using it? Upvote 0
makis_best Well-Known Member Licensed User Longtime User Jun 19, 2019 #3 The only problem I have is that I can't use two conditions using it I mean I have a table created... B4X: CREATE TABLE IF NOT EXISTS positions ( id integer PRIMARY KEY, title text NOT NULL, min_salary numeric, tts String ); I want to do a replace into when the id is known and the tts differ. Something like B4X: REPLACE INTO positions (id, title, min_salary, tts) VALUES (2, 'New Sullary', 1100, 'Full') WHERE tts <> 'Low'; Upvote 0
The only problem I have is that I can't use two conditions using it I mean I have a table created... B4X: CREATE TABLE IF NOT EXISTS positions ( id integer PRIMARY KEY, title text NOT NULL, min_salary numeric, tts String ); I want to do a replace into when the id is known and the tts differ. Something like B4X: REPLACE INTO positions (id, title, min_salary, tts) VALUES (2, 'New Sullary', 1100, 'Full') WHERE tts <> 'Low';
DonManfred Expert Licensed User Longtime User Jun 19, 2019 #4 http://www.sqlitetutorial.net/sqlite-replace-statement/ Upvote 0
makis_best Well-Known Member Licensed User Longtime User Jun 19, 2019 #5 Nice like @DonManfred Well done... Work like a charm Upvote 0
AnandGupta Expert Licensed User Longtime User Jun 20, 2019 #6 DonManfred said: http://www.sqlitetutorial.net/sqlite-replace-statement/ Click to expand... Very useful for beginners in sqlite, thanks a lot. Regards, Anand Upvote 0
DonManfred said: http://www.sqlitetutorial.net/sqlite-replace-statement/ Click to expand... Very useful for beginners in sqlite, thanks a lot. Regards, Anand