I have a need to create a new SQL Lite database. My only means to do so is with a utility "WinSQL". It connects to any existing database using a DSN set up in the ODBC administrator that is in the control panel.
My work flow that I have worked out dies when attempting to copy records from an attached , existing database table "Reports", database name "Reports". This is what I have done: (for testing my idea) 1. Copy the Real database "C:\xxx\yyy\.......\reports.db" to c:\temp and copied it to HMA.db 2. Connect to it using a new DSN called "HMA" with WinSQL 3. Created a new table named "HMA" with a field structure that is a subset of "Reports", same field names, types, sizes. EG Create table HMA (field1 varchar(25), field2 varchar(25)) 4. Dropped table "Reports" Now I have my own custom table , its own file remote from the original database that is located in the real world. 5. Connected to "HMA" with DSN "HMA" 6. Issued the following SQL Statement: Attach Database 'C:\Temp\Reports.db' as temp (No errors reported) 7. Issued the following SQL Statement: Select * from temp Result: All the records from the original table that exist in Reports.db 8. OK, now I want to copy all records from temp to HMA with: Select * Into HMA from temp. result: Error near "Into:" 9. Close the connection to "HMA" 10. Reopen the connection to "HMA" The table "temp" does not exist. Is there a better way to get a NEW file , new database from the original database using only a single database connection? Thanks -- View this message in context: http://old.nabble.com/Attach-Database---Insert-Into-no-work-tp31420473p31420473.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users