I am trying to put in a 5500 character query into dynamic sql, and then use the Oracle dbms_sql function to execute the sql. However, there is an error in the sql statement that is being generated, but the error message doesn't help me identify where the error is, as it pertains to the dynamic sql (i.e. error at line nn).
Is there a way for me to get the value of the statement held in the cursor, so that I can see where the problem is? I have tried the dbms_output.put(statement), but that returns an error saying that it is limited to 255 bytes per line.