db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: Need execute command ("/") at the end of sql statement on Oracle.
Date Fri, 21 Jul 2006 05:24:34 GMT
On 7/20/06, Jun Li <allanjunli@gmail.com> wrote:

> Otherwise it won't work. And there is an unnecessary semicolon at the end of
> trigger creation sql.

That's actually not exactly true. The problem is that Oracle has a
problem in that it cannot determine when something is in PL/SQL (e.g.
stored procedures) vs. normal SQL. This is a problem of the definition
of the PL/SQL language and its integration into Oracle SQL.
So far, so bad. What this makes problematic is that the Oracle
commandline tool and the JDBC driver deal with this differently. In
the commandline client, you use the slash to signalize the commandline
tool that the statement is finished. This however is no SQL statement
at all, it never reaches the real database.
With the JDBC driver you simply send the statement and PL/SQL over and
that's that. But, the PL/SQL block that is the body of the CREATE
TRIGGER needs to be terminated by a semicolon (this is different from
normal SQL statements). And a trailing slash will always make the
statement fail.

That being said, I'll probably add a SQL skript generation mode, so
that the Oracle builder can generate different SQL for the two modes.
Could you please open an issue in JIRA (targeted for 1.0) to keep
track of that ?

Tom

Mime
View raw message