Isssues Running .sql from SQL Task of ANT

View: New views
2 Messages — Rating Filter:   Alert me  

Isssues Running .sql from SQL Task of ANT

by Kothari, Shivani :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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@...
For additional commands, e-mail: user-help@...


Re: Isssues Running .sql from SQL Task of ANT

by Andrew Goktepe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <skothari@...>
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@...
> For additional commands, e-mail: user-help@...
>
>