sql server - SQLite INSTEAD OF TRIGGER -


i want convert microsoft sql server trigger

alter trigger [dbo].[trg_eliminoitems] on [dbo].[pedidosencabezado] instead of delete begin      set nocount on;      insert histpedidosencabezado select * pedidosencabezado pedidosid in ( select pedidosid deleted )     insert histpedidositems select * pedidositems pedidosid in ( select pedidosid deleted )      delete pedidositems pedidosid in ( select pedidosid deleted )     delete pedidosencabezado pedidosid in ( select pedidosid deleted )  end 

into sqlite.

sqlite not allow instead of triggers on tables, going delete records anyway:

create trigger trg_eliminoitems before delete on pedidosencabezado each row begin     insert histpedidosencabezado       select * pedidosencabezado pedidosid = old.pedidosid;     insert histpedidositems       select * pedidositems      pedidosid = old.pedidosid;     delete pedidositems          pedidosid = old.pedidosid; end; 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -