[ 
http://jira.codehaus.org/browse/MSQL-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=267205#action_267205
 ] 

Michael Bellomo commented on MSQL-56:
-------------------------------------

If we use delimitor / and delimitorType row, then the file needs to be

create table bar(insert_ts timestamp not null)
/

create or replace.......

which, I believe, won't work with sqlplus.

==============================================================================

The above works fine with sqlplus.

~/src $ cat go.sql
create table bar(insert_ts timestamp not null)
/

create or replace trigger foo
before insert on bar
for each row
begin
select systime into :new.insert_ts FROM DUAL;
end;
/

~/src $ sqlplus user/pass@mydb @go.sql

SQL*Plus: Release 10.2.0.4.0 - Production on Mon May 16 23:20:21 2011

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Data Mining and Real 
Application Testing options


Table created.


Warning: Trigger created with compilation errors.

SQL>



> Plugin compatibility with SQLPlus
> ---------------------------------
>
>                 Key: MSQL-56
>                 URL: http://jira.codehaus.org/browse/MSQL-56
>             Project: Maven 2.x SQL Plugin
>          Issue Type: New Feature
>    Affects Versions: 1.4
>         Environment: Oracle 10
>            Reporter: Nick Sayer
>            Priority: Minor
>         Attachments: msql-56-include.diff
>
>
> We'd like to use the same schema script files operationally to deploy our 
> app(s) and for developers to develop with them.
> The issue is that operations uses sqlplus to run the scripts and we'd like 
> for the developers to be able to use the sql plugin.
> The problems are twofold (that we've found so far):
> @ include file syntax
> PL/SQL block syntax
> An example of the latter is
> create table bar(insert_ts timestamp not null);
> create or replace trigger foo
> before insert on bar
> for each row
> begin
>   select systime into :new.insert_ts FROM DUAL;
> end;
> /
> Note that the create table operation uses ; as the separator / terminator, 
> but the trigger uses a / on a line by itself.
> If we use delimitor / and delimitorType row, then the file needs to be
> create table bar(insert_ts timestamp not null)
> /
> create or replace.......
> which, I believe, won't work with sqlplus.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to