0 - 3 of 3 tags for #procedure

Hi!
I've got issue with error handling in my procedure
Here's some of my code:

Guys,

 

could you assist me in finding the mistake?

 

BEGIN TRANSACTION;

 

DECLARE MAX_DATE DATE;

 

SET MAX_DATE = (SELECT MAX(V_MONTH) FROM DB_TEMP.HISTORIAL_DATA);

 

SELECT * FROM DB_TEMP.HISTORIAL_DATA WHERE V_MONTH = MAX_DATE;

 

END TRANSACTION;

In Teradata Studio, when executing a REPLACE PROCEDURE statement with a comment (block /* */or single-line --) above the statement, I receive the error "REPLACE  failed.  Failed [3706 : 42000] Syntax error: Invalid  SQL Statement." Below is an example that fails but if you remove the "-- comment" line it is successful.