You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by VGupta <vi...@yahoo.com> on 2006/01/03 06:19:57 UTC

Problem: Ant's SQL task does not support copy via indirection

If the sql file contains data to be loaded in the following format 
   
  COPY bcd  (PolicySymbol, StateCode, SqlTable, CallType, SubType, FieldIdentifier, TagName) FROM stdin;
PAC $$ AGR_ST_COV RATE/AUDIT  MOD_FACTOR4 PRICING TIER
PAC $$ AGR_ST_COV RATE/AUDIT  MOD_FACTOR5 CAPPING FACTOR
.................................
   
  The above call to sql task would hang as there is ome problem with the sql task.
  (I think ant tasks expects sql statements and does not support copy via redirection to stdin.) 
   
  Can anybody please suggest me some way of loading this sql file on a database server which is running on a remote machine. 
   
  Regards, 
Vipul Gupta 


		
---------------------------------
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.

Re: Problem: Ant's SQL task does not support copy via indirection

Posted by Kev Jackson <fo...@gmail.com>.
On 3 Jan 2006, at 12:19, VGupta wrote:

> If the sql file contains data to be loaded in the following format
>
>   COPY bcd  (PolicySymbol, StateCode, SqlTable, CallType, SubType,  
> FieldIdentifier, TagName) FROM stdin;
> PAC $$ AGR_ST_COV RATE/AUDIT  MOD_FACTOR4 PRICING TIER
> PAC $$ AGR_ST_COV RATE/AUDIT  MOD_FACTOR5 CAPPING FACTOR
> .................................
>
>   The above call to sql task would hang as there is ome problem  
> with the sql task.
>   (I think ant tasks expects sql statements and does not support  
> copy via redirection to stdin.)
>
>   Can anybody please suggest me some way of loading this sql file  
> on a database server which is running on a remote machine.
>
>

What syntax is that?  It looks like some product specific thing (like  
SQL Loader or equivalent).  If you want to execute a command on the  
remote server, something like the exec task may be of more use.   
There is also an FTP task for moving files to the remote server.

More information about what you are trying to achieve would help us  
narrow down the options.  Maybe Ant isn't the appropriate tool for  
what you are trying to do.

Kev


--
"Government is begotten of aggression, by aggression" - Herbert Spencer


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


Re: Problem: Ant's SQL task does not support copy via indirection

Posted by Kev Jackson <fo...@gmail.com>.
On 3 Jan 2006, at 12:19, VGupta wrote:

> If the sql file contains data to be loaded in the following format
>
>   COPY bcd  (PolicySymbol, StateCode, SqlTable, CallType, SubType,  
> FieldIdentifier, TagName) FROM stdin;
> PAC $$ AGR_ST_COV RATE/AUDIT  MOD_FACTOR4 PRICING TIER
> PAC $$ AGR_ST_COV RATE/AUDIT  MOD_FACTOR5 CAPPING FACTOR
> .................................
>
>   The above call to sql task would hang as there is ome problem  
> with the sql task.
>   (I think ant tasks expects sql statements and does not support  
> copy via redirection to stdin.)
>
>   Can anybody please suggest me some way of loading this sql file  
> on a database server which is running on a remote machine.
>
>

What syntax is that?  It looks like some product specific thing (like  
SQL Loader or equivalent).  If you want to execute a command on the  
remote server, something like the exec task may be of more use.   
There is also an FTP task for moving files to the remote server.

More information about what you are trying to achieve would help us  
narrow down the options.  Maybe Ant isn't the appropriate tool for  
what you are trying to do.

Kev


--
"Government is begotten of aggression, by aggression" - Herbert Spencer


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