Shawn Wilsher <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 1, 2008 at 3:24 PM, Igor Tandetnik
> <[EMAIL PROTECTED]> wrote:
>> CREATE TRIGGER ....
>> BEGIN
>>    insert into temp_table
>>    select * from perm_table
>>    where <the data is currently not in temp table> and
>>               <which record you want copied>;
>>
>>    update temp_table set ...;
>> END;
> I had thought of this, but I'm pretty sure this will only work
> correctly the first time you try to update the view.  Subsequent calls
> will try to copy the data into the temp table, but correctly fail.

They won't fail - they will successfully insert zero records. It's 
perfectly valid to run INSERT ... SELECT and have the SELECT part 
produce an empty resultset. It simply does nothing.

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to