--- T&B <[EMAIL PROTECTED]> wrote:
> As mentioned, all the associated triggers are deleted. IS there a way
> to systematically locate and keep them? Such as:
>
> set viewDefinition to SQLExec( "select sql || ';' from sqlite_master
> where type = 'view' and name = 'MyView';" )
> set triggerDefinitions to SQLExec( "select sql || ';' from
> sqlite_master where type = 'trigger' and sql like '%on MyView%';" )
> SQLExec( "drop view 'MyView';" )
> set viewDefinition to ChangeColumnDefinitions( viewDefinition )
> SQLExec( viewDefinition )
> SQLExec( triggerDefinitions )
>
> However, that would fail because the test "like '%on MyView%'" is not
> robust or accurate enough.
You've got the right idea. Just make use of sqlite_master.tbl_name.
select sql || ';' from sqlite_master
where type = 'trigger' and tbl_name = 'MyView';
sqlite_master.name is the name of the table/view/index/trigger itself,
and sqlite_master.tbl_name is what it acts on.
____________________________________________________________________________________
Choose the right car based on your needs. Check out Yahoo! Autos new Car
Finder tool.
http://autos.yahoo.com/carfinder/
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------