Viewing 15 posts - 16,411 through 16,425 (of 18,923 total)
how can an id be duplicated...
what's the primary key of the table??
Can you post the table definition so we can show you the exact script?
June 21, 2005 at 3:00 pm
Still no luck with
SET @MyAmount = 627 --Select sum(Value) from MyTable where value % 2 = 1
SELECT @MyCol = MAX(Col)+1 FROM MyTable
June 21, 2005 at 2:59 pm
It happens only for objects that require a script to work (views/functions/sps...)
June 21, 2005 at 2:57 pm
[Farrell's version]
Doesn't work in this case :
DECLARE @MyAmount NUMERIC(12,2)
DECLARE @MyCol int
SET @MyAmount = 627 --Select sum(Value) from MyTable where value % 2 = 1
SELECT @MyCol = MAX( Col)...
June 21, 2005 at 2:54 pm
To sum up : yes it's true
.
June 21, 2005 at 2:46 pm
It wouldn't solve the problem... the trigger still has to finish before giving the control back to the proc...
June 21, 2005 at 2:44 pm
this could come in handy :
WAITFOR DELAY '00:00:01' --wait 1 second then resume the script
June 21, 2005 at 2:36 pm
if you have a view named view1 and you rename it with EM (or with sp_rename), the script will still go as :
CREATE VIEW dbo.view1...
You have to change that...
June 21, 2005 at 2:35 pm
Is there a way to make to trigger run faster?
Can we see the code?
June 21, 2005 at 2:28 pm
yes but its seems to be embeded into its own script... hard to tell where this behavior comes from.
June 21, 2005 at 2:23 pm
We don't have many yellers here.. you should be ok
.
June 21, 2005 at 2:09 pm
Ya, I'll hold my breath... (30 M peeps in here).
June 21, 2005 at 2:08 pm
Maybe you can simply create a linked server. Then an instead of insert trigger would do this :
insert into LinkedServer.DbName.owner.Table (col1, col2, coln) Select col1, col2, coln from dbo.Inserted
June 21, 2005 at 1:52 pm
First time I read that... I'll see what others have to say about this.
June 21, 2005 at 1:46 pm
Viewing 15 posts - 16,411 through 16,425 (of 18,923 total)