You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Kothari, Shivani" <sk...@inteqnet.com> on 2008/05/08 08:52:10 UTC

Isssues Running .sql from SQL Task of ANT


Hi,

I am executing .sql which has procedure with ${@colindex.0} . This .sql
is executed from SQL Task through ANT scripts.  This .sql file having
procedure is runnin properly form sql server studio.


Statements in SQL procedure :
SET @PLOT_LINK =
'openForm("ESD_ADM032_FRM_AUTO_ROUTING&look_up=true",${@colindex.0},810,
375, "auto", false );'
REPLACE (@PLOT_LINK, '${@colindex.0}', CAST(a.row_id AS nvarchar)) AS
plot_link

Error while executing through ANT
[sql] com.inet.tds.ap: Unknown escape sequence '{ colindex.0}'

Let me know what should be done?
Thanks 


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


Re: Isssues Running .sql from SQL Task of ANT

Posted by Andrew Goktepe <an...@gmail.com>.
If you are running Ant 1.7.0 try expandproperties="false" on <sql>.  I'm not
sure this works when running a separate sql file but it is worth a try.

Otherwise I would try escaping the ${@colindex.0} with double $s and maybe
double @s as well:

$${@@colindex.0}

I haven't tested either of these but this is what I would try next.

-Andrew

On Thu, May 8, 2008 at 1:52 AM, Kothari, Shivani <sk...@inteqnet.com>
wrote:

>
>
> Hi,
>
> I am executing .sql which has procedure with ${@colindex.0} . This .sql
> is executed from SQL Task through ANT scripts.  This .sql file having
> procedure is runnin properly form sql server studio.
>
>
> Statements in SQL procedure :
> SET @PLOT_LINK =
> 'openForm("ESD_ADM032_FRM_AUTO_ROUTING&look_up=true",${@colindex.0},810,
> 375, "auto", false );'
> REPLACE (@PLOT_LINK, '${@colindex.0}', CAST(a.row_id AS nvarchar)) AS
> plot_link
>
> Error while executing through ANT
> [sql] com.inet.tds.ap: Unknown escape sequence '{ colindex.0}'
>
> Let me know what should be done?
> Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>