var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Syntax Error help needed
Below is a trigger I am working on. I am receiving several errors and do not know how to resolve. One of the Errors is the line that says 'IF @ClearBy IS NULL' There are also other errors with the IF statement. Please help. I am new at this.
CREATE Trigger trg_employees
Declare @Comment nvarchar(1000)
Declare @TechnicianRemarks nvarchar(1000)
Declare @ClearBy nvarchar(25)
Declare @ClearDate datetime
Declare @ClearTime datetime
Declare @Type nvarchar(50)
Select @Comment = Comment FROM INSERTED
Select @TechnicianRemarks = Resolution FROM INSERTED
Select @ClearBy = ClearBy FROM INSERTED
Select @ClearDate = ClearDate FROM INSERTED
Select @ClearTime = ClearTime FROM INSERTED
Select @Type = Type FROM INSERTED
/*Check to see if the ClearBy field is NULL. We only want to send an email
if the ClearByField is NOT NULL.
IF @ClearBy IS NULL
--Now Check to see if the ticket is a Service Order (SO) or a Trouble Ticket (TR)
IF @Type = 'SO'
IF @ClearBy IS NOT NULL
--here U must do sth.,such as send an e-mail.
Pls have a try ,and tell me the result.
That took care of the problem. Thanks a bunch