so i need insert first_name and last_name from source table where row contains same uid from handler and insert to recordtable and add record_time.
cur.execute("""INSERT INTO recordtable (first_name,
last_name,
record_time)
SELECT first_name, last_name
FROM sourcetable
WHERE uid is ?""", ("some string from handler"))
Thats the best i can do but i still need add record_time from handler to that execute, how to do it?
here how tables look:
CREATE TABLE IF NOT EXISTS sourcetable (
uid TEXT NOT NULL UNIQUE,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL);
CREATE TABLE IF NOT EXISTS recordtable (
id INTEGER PRIMARY KEY,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
record_time DATETIME);