I tried it and it works fine if I append the "@tnsname" to the username and password. The sql tag also works fine for me but when I try to execute the sql script it can't execute the following lines of SQL(same behaviour when I use the exec task):
CREATE OR REPLACE TRIGGER TRBISQ_ASSETS_REPORTS BEFORE INSERT ON NOKIA_ASSETS_REPORTS REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT SQ_NOKIA_ASSETS_REPORTS.NEXTVAL INTO :NEW.ID FROM DUAL; END; [sql] Failed to execute: END [sql] java.sql.SQLException: ORA-00900: invalid SQL statement Everything works fine in TOAD. Is the problem the ":NEW.ID" string? /G�ran > -----Original Message----- > From: ext Erik Hatcher [mailto:[EMAIL PROTECTED]] > Sent: 12. September 2002 13:01 > To: Ant Users List > Subject: Re: How to execute sqlplus from ant's exec task? > > > Have you tried it? And? > > How about the <sql> task? Would that work better for you? > > Erik > > > [EMAIL PROTECTED] wrote: > > Hi > > > > How do I execute sqlplus from ant's exec task? I would like > to do something like the following: > > <target name="executeSQLscript"> > > <exec executable="${sqlplus-path}/SQLPLUS.EXE"> > > <arg line=" ${sqlplus-username.password} > @${sqlscriptfile}"/> > > </exec> > > </target> > > Thanks! > > G�ran > > > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
