Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Trigger Syntax
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Help with Trigger Syntax
Miscellaneous
Thread ID:
00845644
Message ID:
00845644
Views:
54
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 
Next
Reply
Map
View

Click here to load this message in the networking platform