Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ferrethouse
Constraint Violating Yak Guru
352 Posts |
Posted - 2010-01-29 : 00:42:07
|
When I have this trigger in place the inserts seem to fail (not sure how to debug it). Here is the trigger code...SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TRIGGER [dbo].[LearningPath_CertificateURL_Trigger]ON [dbo].[LearningPaths]FOR INSERTAS BEGIN SET NOCOUNT ON;DECLARE @CertURL varchar(500)SET @CertURL = (select CertificateURL from Inserted) if @CertURL is null UPDATE LearningPath SET CertificateURL = '_certificate.swf' where LearningPathID = Inserted.LearningPathID END |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-01-29 : 01:06:10
|
[code]UPDATE aSET CertificateURL = '_certificate.swf' FROM LearningPath a inner join inserted ion a.LearningPathID = i.LearningPathIDwhere i.CertificateURL is null[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|