Thursday, March 8, 2012

Can I use table data type in a trigger?

This little batch:
========================================
====
create trigger x on T after insert, update
as
declare @.z table (id int not null)
select
@.z = (select col from table)
go
========================================
====
seems to contain some invalid logic.
QA returns me that I have to declare @.z. But i do this.
Any help appreciated.
Regards.
fabri
Sei un italiano medio, di oltre trent'anni se:
Sai che il codice SYS64738 serviva per riavviare il Commodore 64 ed hai
cambiato almeno una mezza dozzina di joystick Quickshot I giocando a
Summer Games.
MKDS nick & friend Code:
Joker - 055895 043343I got it:

> create trigger x on T after insert, update
> as
> declare @.z table (id int not null)
> insert into @.z = select col from table
> go
fabri
Sei un italiano medio, di oltre trent'anni se:
Sai che il codice SYS64738 serviva per riavviare il Commodore 64 ed hai
cambiato almeno una mezza dozzina di joystick Quickshot I giocando a
Summer Games.
MKDS nick & friend Code:
Joker - 055895 043343

No comments:

Post a Comment