Greetings. I have this table,
create table a (a, b, c); insert into a values (1, 2, 3); insert into a values (2, 3, 4); insert into a values (3, 4, 5); insert into a values (4, 5, 6); insert into a values (5, 6, 7); insert into a values (6, 7, 8); and I also have this table, create table b (a, b, c, d, e); I want to INSERT the data in table a, to b. I tried these, sqlite> insert into b (a, b, c, d, e) values (SELECT a, b, c, 'user1','2019-03-01 14:22:33' FROM a); Error: near "SELECT": syntax error I then tried, sqlite> insert into b (a, b, c, d, e) values ((SELECT a, b, c, 'user1','2019-03-01 14:22:33' FROM a)); Error: 1 values for 5 columns and I also tried, sqlite> insert into b (a, b, c, d, e) values ((SELECT a, b, c FROM a), 'user1','2019-03-01 14:22:33')); Error: near ")": syntax error I tried looking at the INSERT help, https://sqlite.org/lang_insert.html, but I couldn't make sense of it. Any help would be greatly appreciated. thanks. josé _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users