Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unable to preserve trigger
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01412205
Message ID:
01412208
Vues:
35
What is compatible level of the database?


>Hi All,
>
>I am not able to change the datatype from varchar(1000) to varchar(max) in one of my SQL Server 2005 table.
>The error is pointing to the AFTER UPDATE trigger with the following message:
>
>
>- Unable to preserve trigger 'tr_auditUpdates'.  
>Operand type clash: varchar(max) is incompatible with sql_variant
>
>
>..and here is the trigger:
>
>
>ALTER TRIGGER [tr_auditUpdates]
>ON [dbo].[m_itemUpdate]
>AFTER UPDATE
>AS
>
>	IF UPDATE(cTechDescript)
>		BEGIN
>			IF EXISTS (SELECT *
>						FROM inserted a
>							JOIN deleted b ON a.cSKUId = b.cSKUId
>						WHERE a.cTechDescript <> b.cTechDescript)
>				BEGIN
>					INSERT INTO m_itemUpdateTrsn
>						SELECT a.cSKUId, 'TechDescription' as cValueName,
>								b.cTechDescript, a.cTechDescript,
>								a.cLastUpdateBy, GETDATE() as dUpdateOn
>						FROM inserted a JOIN deleted b ON
>							a.cSKUId = b.cSKUId
>				END
>		END
>
>
>Thank you,
>Daniel
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform