Viewing 15 posts - 16 through 30 (of 101 total)
UFFF! ive made it...after a lot of effort.
thanks for your help.
now i share.
alter TRIGGER trgAfterInsert ON eicanalesres
FOR INSERT
AS
declare @contrato decimal (10,0);
declare @canal decimal (10,0);
declare @servidor datetime;
declare @maquina datetime;
declare @corregida...
September 9, 2010 at 1:30 pm
Michael L John (9/9/2010)
It's probably will be something like:
INSERT INTO Table (field, field,...)
VALUES(x, y, ...)
If x = 91 and...
September 9, 2010 at 12:38 pm
Michael L John (9/9/2010)
I want a new record that takes all the data from from the recently inserted record where idcontrato =2 and eicanalid =91. And then give this...
September 9, 2010 at 12:15 pm
Lowell (9/9/2010)
your requirement changed form updating colA and colB to something different....all the clues for your...
September 9, 2010 at 12:02 pm
Lowell (9/9/2010)
igngua (9/9/2010)
September 9, 2010 at 11:49 am
Michael L John (9/9/2010)
A trigger certainly does not seem to be the best method to use to accomplish what needs to be done.
why?
September 9, 2010 at 10:46 am
Lowell (9/9/2010)
September 9, 2010 at 8:37 am
Ok it seems i´ve not been the only with this problem.
I found on the web the following;
create table fred
(fredId int primary key,
value varchar(10))
go
create trigger fred$insertTrigger
on fred
after insert
as
update fred
set fredId...
September 9, 2010 at 8:25 am
Lowell (9/9/2010)
update dbo.eicanalesres
SET idcontrato = '13'
FROM INSERTED
WHERE dbo.eicanalesres.IdContrato = INSERTED.IdContrato
AND dbo.eicanalesres.EiCanalId = INSERTED.EiCanalId
AND dbo.eicanalesres.EiFechServ = INSERTED.EiFechServ
AND inserted.idcontrato = '02'
AND inserted.EiCanalId = '91'
and inserted.eifechserv = eicanalesres.eifechserv
you missed the core...
September 9, 2010 at 7:34 am
Ok...after triying and triying this is closer to an answer but it still goes wrong.
ALTER TRIGGER [dbo].[datosdemo]
ON [dbo].[EICANALESRES]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
...
September 8, 2010 at 10:24 am
Thanks lowell.
Ive tried it on a hurry while leaving work. Ill post back if something goes wrong.
September 7, 2010 at 5:33 pm
Lowell (9/7/2010)
igngua (9/7/2010)
thanks!!
im using this one because the other one cant get updated.
Ive a question if you excuse my 'newbieness', what does 'id' means.
i had to infer a lot...
September 7, 2010 at 4:32 pm
Lowell (9/7/2010)
...
September 7, 2010 at 4:19 pm
Viewing 15 posts - 16 through 30 (of 101 total)