> I have a UDF that cleans a field of control characters and I use it
> like this
[quoted text clipped - 44 lines]
> WHERE, or am going about this all wrong?
> TIA
This seems to work better the result shows I updated 2 records. Is it
becuase an update is really a delete and an update?
ALTER TRIGGER [dbo].[Clean_Q_Lead_Demographics]
ON [Strayer_Staging].[dbo].[Q_Lead_Demographics]
for update, insert
AS
update Strayer_Staging.dbo.Q_Lead_Demographics
set
address1 = dbo.udf_CleanAlphaNum(inserted.Address1),
address2 = dbo.udf_CleanAlphaNum(inserted.Address2),
address3 = dbo.udf_CleanAlphaNum(inserted.Address3),
bad_email = dbo.ValidateEmailAddress(lower(replace(inserted.email,'
',''))),
City = dbo.udf_CleanAlphaNum(inserted.City)
from inserted
where q_lead_demographics.leadid = inserted.leadid
rcamarda - 17 Apr 2008 04:48 GMT
I got the trigger to work, but what added to my confusion was the bulk
load.
I was using the API method of bulk loading as provided in Cognos' Data
Manager ETL tool. I discovered that the trigger would work when I used
a normal relational delivery, but not the API bulk load.
Ed Murphy - 17 Apr 2008 06:23 GMT
> I got the trigger to work, but what added to my confusion was the bulk
> load.
> I was using the API method of bulk loading as provided in Cognos' Data
> Manager ETL tool. I discovered that the trigger would work when I used
> a normal relational delivery, but not the API bulk load.
http://msdn2.microsoft.com/en-us/library/ms171769.aspx indicates that
bulk loads ignore triggers unless called with FireTriggers = TRUE. Does
Data Manager have an option to activate that flag?
rcamarda - 26 Apr 2008 04:04 GMT
Turns out it doesnt.
I've submitted an enhancement request to Cognos about that aspect of
API loads and triggers.