ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From galenboyer...@hotpop.com
Subject Re: SQL task and the delimiter and 1.6.2.
Date Mon, 03 Jan 2005 14:10:42 GMT
"Anderson, Rob (Global Trade)" <Rob.Anderson@nike.com> writes:

  > Send the relevant portion of your build.xml.

BLUSH,

Thank you for the suggestion.  In gathering up the relevant pieces of
my build.xml I happened upon my error.  I'm profusely sorry to the
group for having a locally unidentified bug prompting me to ask this
group for help.

-- 
Galen

  > 
  > > -----Original Message-----
  > > From: galenboyerdev@hotpop.com [mailto:galenboyerdev@hotpop.com]
  > > Sent: Thursday, December 30, 2004 12:39 PM
  > > To: Ant Users List
  > > Subject: Re: SQL task and the delimiter and 1.6.2.
  > > 
  > > 
  > > "Anderson, Rob (Global Trade)" <Rob.Anderson@nike.com> writes:
  > > 
  > >    > In this case your delimiter is "go".
  > > 
  > > That is my issue.  I use go as my delimiter but multiple statements
  > > still fail.
  > > 
  > >     > -Rob Anderson
  > >     > 
  > >     > > -----Original Message-----
  > >     > > From: galenboyerdev@hotpop.com 
  > > [mailto:galenboyerdev@hotpop.com]
  > >     > > Sent: Thursday, December 30, 2004 11:57 AM
  > >     > > To: Ant Users List
  > >     > > Subject: Re: SQL task and the delimiter and 1.6.2.
  > >     > > 
  > >     > > 
  > >     > > Okay,
  > >     > > 
  > >     > > I'm having the same type of issue with SQLServer.  
  > > I've mucked around
  > >     > > with different combinations of delimiters but two 
  > > statements in the
  > >     > > same file being executed against SQLServer seem to fail.
  > >     > > 
  > >     > > <FILE1:Which is successful>
  > >     > > create view dbo.t1_v1
  > >     > > as 
  > >     > >    select * from t1
  > >     > > go
  > >     > > </FILE1>
  > >     > > 
  > >     > > <FILE2:Which is unsuccessful>
  > >     > > create view dbo.t1_v2
  > >     > > as 
  > >     > >    select * from t1
  > >     > > go
  > >     > > 
  > >     > > create view dbo.t1_v3
  > >     > > as 
  > >     > >    select * from t1
  > >     > > go
  > >     > > </FILE2>
  > >     > > 
  > >     > > HERE IS A COPY OF THE RELEVANT OUTPUT:
  > >     > > 
  > >     > >       [sql] Executing file: 
  > >     > > C:\fmer\dbms_proto\sqlserver\reportplace\views\t1_v1.sql
  > >     > >       [sql] 0 rows affected
  > >     > >       [sql] Executing file: 
  > >     > > C:\fmer\dbms_proto\sqlserver\reportplace\views\t1_v2.sql
  > >     > >       [sql] Failed to execute: 
  > >     > >       [sql] create view dbo.t1_v2
  > >     > >       [sql] as 
  > >     > >       [sql]    select * from t1
  > >     > >       [sql] go
  > >     > >       [sql] 
  > >     > >       [sql] create view dbo.t1_v3
  > >     > >       [sql] as 
  > >     > >       [sql]    select * from t1
  > >     > >       [sql] go
  > >     > > 
  > >     > > BUILD FAILED
  > >     > > C:\fmer\dbmsbin\dbmsbin.xml:170: The following error occurred 
  > >     > > while executing this line:
  > >     > > C:\fmer\dbmsbin\dbmsbin.xml:166: The following error occurred 
  > >     > > while executing this line:
  > >     > > C:\fmer\dbmsbin\dbmsbin.xml:105: java.sql.SQLException: 
  > >     > > [Microsoft][SQLServer 2000 Driver for 
  > >     > > JDBC][SQLServer]Incorrect syntax near the keyword 'create'.
  > >     > > 
  > >     > > Also, notice that I left the SQLServer style delimiter of 
  > >     > > "go" inside the files.
  > >     > > 
  > >     > > Is there something I'm missing from the SQLServer end?
  > >     > > 
  > >     > > Thanks.
  > >     > > 
  > >     > > -- 
  > >     > > Galen Boyer
  > >     > > 
  > >     > > 
  > >     > >     "Velagapudi, Murali" 
  > > <murali.velagapudi@citigroup.com> writes:
  > >     > > 
  > >     > >     > try with  delimiter="/" and replace ; with /
  > >     > >     > it works fine for me on oracle.
  > >     > >     > 
  > >     > >     > thanks,
  > >     > >     > Murali
  > >     > >     > 
  > >     > >     > -----Original Message-----
  > >     > >     > From: news [mailto:news@sea.gmane.org]On Behalf Of
  > >     > >     > galenboyerdev@hotpop.com
  > >     > >     > Sent: Thursday, December 30, 2004 1:52 PM
  > >     > >     > To: user@ant.apache.org
  > >     > >     > Subject: SQL task and the delimiter and 1.6.2.
  > >     > >     > 
  > >     > >     > 
  > >     > >     > I'm having trouble getting more than one statement 
  > >     > > withing a file to
  > >     > >     > execute successfully.  I'm pretty sure it has 
  > > to do with the
  > >     > >     > delimiter.  I am using 1.6.2.
  > >     > >     > 
  > >     > >     > For my sql task, I have the delimiter attribute 
  > > set to ";"
  > >     > >     > 
  > >     > >     > HERE I AM GOING AGAINST ORACLE:
  > >     > >     > 
  > >     > >     > <<FileToExec>>
  > >     > >     > create or replace view t1_v1
  > >     > >     > as 
  > >     > >     >    select * from t1
  > >     > >     > ;
  > >     > >     > 
  > >     > >     > create or replace view t1_v3
  > >     > >     > as 
  > >     > >     >    select * from t1
  > >     > >     > ;
  > >     > >     > <</FileToExec>>
  > >     > >     > 
  > >     > >     > I get the error:
  > >     > >     > 
  > >     > >     > BUILD FAILED
  > >     > >     > C:\fmer\dbmsbin\dbmsbin.xml:170: The following error 
  > >     > > occurred while executing this line:
  > >     > >     > C:\fmer\dbmsbin\dbmsbin.xml:166: The following error 
  > >     > > occurred while executing this line:
  > >     > >     > C:\fmer\dbmsbin\dbmsbin.xml:105: java.sql.SQLException:

  > >     > > ORA-00911: invalid character
  > >     > >     > 
  > >     > >     > IF I CHANGE IT SO I HAVE ONLY ONE STATEMENT:
  > >     > >     > 
  > >     > >     > <<FileToExec>>
  > >     > >     > create or replace view t1_v1
  > >     > >     > as 
  > >     > >     >    select * from t1
  > >     > >     > <</FileToExec>>
  > >     > >     > 
  > >     > >     > I then get success.  
  > >     > >     > 
  > >     > >     > Notice that I also needed to remove the ";" within
  > >     > >     > even the file with only one SQL statement.
  > >     > >     > 
  > >     > >     > I have seen this work on other versions of ant, but 
  > >     > > seems to be giving
  > >     > >     > me fits with the 1.6.2 version.  Am I just missing 
  > >     > > something silly?
  > >     > > 
  > >     > > 
  > >     > > 
  > >     > > 
  > > ---------------------------------------------------------------------
  > >     > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
  > >     > > For additional commands, e-mail: user-help@ant.apache.org
  > >     > > 
  > >     > > 
  > >     > > 
  > >     > 
  > >     > 
  > >     > 
  > > ---------------------------------------------------------------------
  > >     > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
  > >     > For additional commands, e-mail: user-help@ant.apache.org
  > > 
  > > 
  > > 
  > > ---------------------------------------------------------------------
  > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
  > > For additional commands, e-mail: user-help@ant.apache.org
  > > 
  > > 
  > > 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message