0 - 2 of 2 tags for stored-procedure

I have a dynamic stored procedure with an if statement setting a stmt to include in my insert statement. I will only share a portion of the code, enough to get the idea across.  The procedure compiles correctly, but when I validate my if statement this error is returned:


In my stored procedures, I'm looking to start recording an "audit log" after each step.

So for example:

* Step 1 in my Stored Proc

DELETE FROM MyDatabase.MyTable_Step1 ALL;

INSERT INTO MyDatabase.MyTable_Step1
SELECT blah;

* Insert Audit Log for the above step

INSERT INTO MyDatabase.AuditLog(SPName, Step, Timestmp, RowsImpacted)
VALUES('MySP', 'Step 1', CURRENT_TIMESTAMMP, CountRowsImpacted() );

* Step 2 in my Stored Proc

UPDATE MyDatabase.MyTable_Step1
FROM ( SELECT 'blah' AS blah ) AS a
SET Col = a.blah