sadhramani
Programmer
When I try to save a Stored procedure, I get a error.
Below is the code for the stored procedure:
CREATE PROCEDURE CheckTableExists(in :Table_Name varchar);
BEGIN
DECLARE :TestName char(20);
SELECT XF$Name INTO :TestName FROM X$File WHERE XF$Name=:Table_Name;
IF RTrimTestName) = :Table_Name THEN
DROP TABLE :Table_Name;
End If;
END;
I am passing a table name as a parameter to this stored procedure and it checks whether that table is available. If yes, drop that table.
I get a error in the "DROP TABLE" statement.
The error message is:
Syntax Error: DROP TABLE<<???>>?
Below is the code for the stored procedure:
CREATE PROCEDURE CheckTableExists(in :Table_Name varchar);
BEGIN
DECLARE :TestName char(20);
SELECT XF$Name INTO :TestName FROM X$File WHERE XF$Name=:Table_Name;
IF RTrimTestName) = :Table_Name THEN
DROP TABLE :Table_Name;
End If;
END;
I am passing a table name as a parameter to this stored procedure and it checks whether that table is available. If yes, drop that table.
I get a error in the "DROP TABLE" statement.
The error message is:
Syntax Error: DROP TABLE<<???>>?