You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-user@db.apache.org by Jun Li <al...@gmail.com> on 2006/07/21 03:03:26 UTC

Need execute command ("/") at the end of sql statement on Oracle.

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


--------------
Cheers,
Jun

Re: Need execute command ("/") at the end of sql statement on Oracle.

Posted by Jun Li <al...@gmail.com>.
That's good.

Thanks.


On 7/24/06, Thomas Dudziak <to...@gmail.com> wrote:
>
> I've added support for script generation which is used automatically
> by the WriteSchemaSqlToFile subcommand, and is also available in the
> API (Platform interface).
>
> Tom
>



-- 
--------------
Cheers,
Jun

Re: Need execute command ("/") at the end of sql statement on Oracle.

Posted by Thomas Dudziak <to...@gmail.com>.
I've added support for script generation which is used automatically
by the WriteSchemaSqlToFile subcommand, and is also available in the
API (Platform interface).

Tom

Re: Need execute command ("/") at the end of sql statement on Oracle.

Posted by Thomas Dudziak <to...@gmail.com>.
On 7/20/06, Jun Li <al...@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

Re: Need execute command ("/") at the end of sql statement on Oracle.

Posted by Jun Li <al...@gmail.com>.
I meant at the end of trigger creation sql statement.

On 7/21/06, Jun Li <al...@gmail.com> wrote:
>
> Otherwise it won't work. And there is an unnecessary semicolon at the end
> of trigger creation sql.
>
>
> --------------
> Cheers,
>
> Jun
>



-- 
--------------
Cheers,
Jun