ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Madigan" <...@madigans.org>
Subject Escaping strings in SQL scripts
Date Thu, 27 Apr 2006 15:59:01 GMT
I have a bunch of functions that I need to write to my SQL database.  The
functions contain quoted strings that span many lines like

'DECLARE seq RECORD;
 BEGIN SELECT * INTO seq FROM ...;
 IF FOUND THEN
     UPDATE ...;
 END IF;
 IF NOT FOUND THEN
    RETURN ...;
 END IF;
 RETURN NULL;
 END;'

Is there a way to write the script so I don't have to join the function as a
single long line?

The functions are in foo.sql type files and are read with

    <sql
        driver="org.postgresql.Driver"
        url="jdbc:postgresql://localhost/..."
        userid= ...
        password= ...
        autocommit="true" >
        <fileset dir=".">
            <include name="foo.sql"/>
        </fileset>
    </sql>

Any help would be greatly appreciated


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


Mime
View raw message