Reputation: 5034
I'm running the following SQL block:
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE table_name (id INT NOT NULL)';
END;
And getting:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
( begin case declare end exception exit for goto if loop mod...
I'm confused because this runs fine in Oracle SQL Developer, but when I execute it with the Oracle JDBC driver, it throws this error.
Upvotes: 1
Views: 1444
Reputation: 5034
The problem turned out to be the way that the Oracle driver was parsing the SQL string. Taking out the newlines fixed it.
Upvotes: 2