When running a SQL Rewrite on a query where a comment exists after the FROM clause and it causes the following error:
[IBM][CLI Driver][DB2/AIX64] SQL0198N the statement string of the PREPARE or EXECUTE IMMEDIATE statement is blank or empty. SQLSTATE=42617
Example query to cause the error:
Select *
From
--Table1 comment,
Table_2;
But if the comment is taken out, it rewrites fine.
WORKAROUND:
None. Delete any comments in the query to allow the rewrite to work.
STATUS:
Waiting for a fix in a future release of Toad for DB2.