Good to know Peter. I have been working on a Table Merge function for some 
time, and one of the features is to be able to isolate the SQL for creation of 
a table, allow the user to pick which columns to merge between the tables, ant 
then if necessary, create the table in the destination database with the 
columns that the user selected. So a method for producing the exact syntax for 
table and column was essential to this. 

It's still buggy, but functional. I keep going back through and reworking 
things, mainly interface issues. But the code to actually create new tables and 
insert columns into existing ones identical to the source columns is all 
intact. It's been a fun project and has taught me a lot about SQL, specifically 
the subtle differences in syntax, which SQL was supposedly going to eliminate 
when it was first conceived. 

Bob


On Jan 6, 2011, at 11:47 AM, Peter Haworth wrote:

> SQLite does have an ALTER TABLE command.  You can use it to rename a table or 
> add a column but that's all.  I've used the same technique as Bob to get the 
> CREATE command for a table and I believe that the sql syntax is updated by an 
> ALTER command, not a second entry created.  I use the SQLite admin plugin for 
> Firefox do other types of table structure changes and it does indeed unload 
> the table, delete it, then load it again and it seem to recreate any 
> indexes/triggers associated with the table.  The CREATE syntax in th mastr 
> table is recreated automatically since the table is re-created.
> 
> Pete Haworth


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to