I'm trying to use ant's sql task to execute scripts on a Sybase ASE 12.5.1 database. I thought everything was working but realized that without the 'keepformat' attribute set my SQL files are being munged (lined endings and comments being stripped) which means stored procs are being munged on creation.
The trouble is, when I set keepformat this seems to be incompatible with the delimeter and delimitertype attributes: delimiters are ignored and the whole file is sent through. I get the following error: com.sybase.jdbc3.jdbc.SybSQLException: Incorrect syntax near 'go'. I've searched the archives and past mails seem to indicate setting the escapeprocessing might help but it doesn't. I've tried changing the delimiter. Example sql task below. Any workunit.sql in the file list below containing a 'go' causes the above error. Any help much appreciated. Thanks Gareth <sql driver="${db.driver}" url="${db.url}" userid="${db.user}" password="${db.password}" classpath="${db.classpath}" append="true" caching="on" delimiter="go" delimitertype="row" print="true" autocommit="true" keepformat="true" escapeprocessing="true" > select @@servername go <path> <filelist dir="."> <file name="workunit1.sql" /> <file name="workunit1.sql "/> </filelist> </path> </sql>