Wow, it is incredibly hard just to delete a column in sqlite and I have been trying 20 things for the last 2 days now.
At the moment I have some code that does not give me an error (hurrah!), but it also doesn't give me any results.
I am working of the SQL:FAQ way of thinking - http://www.sqlite.org/faq.html#q11 but I am stuck where my code runs without errors, but when I open the database with DB Browser, the new table only has the headings of the one I copied, but not the data.
Here is the code:
backup = "backup"
c.execute("CREATE TABLE IF NOT EXISTS {bu} (id INTEGER PRIMARY KEY AUTOINCREMENT, headline TEXT, datestamp TEXT, link TEXT)".format(bu=backup))
c.execute("INSERT INTO {dt} SELECT {id}, {hl}, {ds}, {lk} FROM {on}".format(dt=backup, id="id", hl="headline", ds="datestamp", lk="link", on=old_table))
Like I said, it runs, but there is no data in the new table, only the headings of the columns.
Beyond frustrated, any help will be appreciated