You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/08/24 21:51:28 UTC

DO NOT REPLY [Bug 20261] - Add a Sql task parameter to set the output column delimiter

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=20261>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=20261





------- Additional Comments From imfthomp@yahoo.com  2006-08-24 19:51 -------
ANT SQL task currently hard codes the column separator as a ',' which means:
1) selects of data columns containing commas effectively introduces extra 
columns, randomly, according to appearance of commas in the data.
2) separately, if you did want a different column separator you then have to do 
an extra processing step (replaceregexp comma to desired-separator).

Workaround for data containing commas where you want a desired-separator is:
1) SQL - instead of SELECT data do SELECT REPLACE(data,',',COMMA_MARKER) on any 
selected column that might contain comma.
2) REPLACEREGEXP on result of 1 to map commas from ANTs SQL output back to 
desired-separator.
3) REPLACEREGEXP on result of 2 to map COMMA_MARKER back to ','      

An alternative is to write your own SQL task.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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