Cornel Gazdaru <[EMAIL PROTECTED]> writes: > I try copying a table from a :memory: data base to a file data base, but > could not make it work. > Anybody has any suggestions? > Thanks > > I tried something like: > > open a data base :memory: > create table MYTABLE (...) > ....... > > attach 'filename.db' as FileDB > create table FileDB.MYTABLE as select * from MYTABLE > detach FileDB
IIRC, you can't create a table in an attached DB. Instead, you can create an empty table MYTABLE in filename.db first, then do similarly to what you were previously: open a data base :memory: create table MYTABLE (...) ....... attach 'filename.db' as FileDB insert into FileDB.MYTABLE select * from MAIN.MYTABLE detach FileDB