Just use
mclient.bat -u monetdb -d somedb -s "select * from sometable" >
.\somefile.csv
You might want to add the -fcsv option as well to get csv output. And
if you use -fcsv+, (that's a plus sign and a comma) you get
comma-separated fields and a header line:
mclient.bat -fcsv+, -u monetdb -d somedb -s "select * from sometable" >
somefile.csv
Also see [1].
[1] https://www.monetdb.org/Documentation/mclient-man-page
> _______________________________________________
On 02/11/2016 09:25 PM, Anton Kravchenko wrote:
> Hi there,
>
> I wonder if one can copy a query result into stdout and redirect it to a
> file?
>
> I've tried:
> mclient.bat -u monetdb -d somedb -s "copy select * from sometable into
> stdout" - > .\somefile.csv
>
> But, only the table header is saved in somefile.csv...
>
>
> P.S. 'select * from sometable' shows all data rows as expected.
> I am using MonetDB v11.21.11 (Jul2015-SP1) on Windows.
>
> Thank you,
> Anton
>
>
>
>
> users-list mailing list
> users-list@monetdb.org
> https://www.monetdb.org/mailman/listinfo/users-list
>
--
Sjoerd Mullender
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list