Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Trigger Syntax
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Help with Trigger Syntax
Divers
Thread ID:
00845644
Message ID:
00845644
Vues:
55
I'm missing something in this trigger defination, if I click the Check Syntax button I get a message that everything is OK, but when I click the apply button, I'm getting a message saying:
---------------------------
Microsoft SQL-DMO (ODBC SQLState: 42S22)
---------------------------
Error 2714: Invalid column name ' '.
---------------------------
OK   
---------------------------
Here is my tigger code I'm trying to put in.
CREATE TRIGGER [Audit_Update] ON dbo.meetings
  FOR UPDATE
AS
declare @tcAction varchar(500)
set @tcAction=" "

if update(begintime) or update(RoomID)
     begin
	if update(Begintime)
                            set @tcAction='Scheduled Time/Date Changed  '
	if Update(RoomID)
                            set @tcAction=@tcAction+'Room Changed'
	  INSERT INTO meeting_Audit (meetingnumber,begintime,endtime,patientID,roomid,actualRoomID,ScheduledBy,BlockMember,LastAuditForm,LastAuditBy)
                            (SELECT meetingnumber,begintime,endtime,patientID,roomid,actualRoomID,ScheduledBy,BlockMember,@tcAction,dbo.get_login_name()
		from deleted)
    end 
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform