[firebird-support] Export data to CSV file from stored procedure?

2014-08-20 Thread conver...@gmail.com [firebird-support]
Hi there,
 
 As subject, is it possible to export a query result set to an external csv 
file from a Firebird stored procedure? I know this can be done with IBExpert 
but we are looking for a pure firebird sql solution. We are using Firebrd 2.5.
 

 Any pointers on how to do this will be much appreciated.
 

 Regards,
 

 -Ed
 



Re: [firebird-support] Export data to CSV file from stored procedure?

2014-08-20 Thread Nick Upson n...@telensa.com [firebird-support]
you could define an external table with 1 field, construct a csv within the
SP ​and write to the table

Nick Upson, Telensa Ltd, Senior Operations Network Engineer
direct +44 (0) 1799 533252, support hotline +44 (0) 1799 399200


On 20 August 2014 17:19, conver...@gmail.com [firebird-support] <
firebird-support@yahoogroups.com> wrote:

>
>
> Hi there,
>
> As subject, is it possible to export a query result set to an external csv
> file from a Firebird stored procedure? I know this can be done with
> IBExpert but we are looking for a pure firebird sql solution. We are using
> Firebrd 2.5.
>
>
> Any pointers on how to do this will be much appreciated.
>
>
> Regards,
>
>
> -Ed
>
>
>  
>


Re: [firebird-support] Export data to CSV file from stored procedure?

2014-08-20 Thread Tim Ward t...@telensa.com [firebird-support]
You want to be looking around your external CSV file being an "external 
table" - that's the only way to write to files from stored procedures 
AFAIK, so, no matter how convoluted the code ends up, that's probably 
the approach you'll have to take.


(Unless there's new stuff in 2.5 I don't know about, I've only done this 
with 2.1.)


On 20/08/2014 17:19, conver...@gmail.com [firebird-support] wrote:


Hi there,

As subject, is it possible to export a query result set to an external 
csv file from a Firebird stored procedure? I know this can be done 
with IBExpert but we are looking for a pure firebird sql solution. We 
are using Firebrd 2.5.



Any pointers on how to do this will be much appreciated.


Regards,


-Ed






--
Tim Ward



Re: [firebird-support] Export data to CSV file from stored procedure?

2014-08-21 Thread Thomas Beckmann thomas.beckm...@assfinet.de [firebird-support]
There are UDFs around to write files (example rfunc:
http://rfunc.sourceforge.net/) and you can use freeadhocudf
(http://freeadhocudf.org/dokumentation_deutsch/dok_deu_blob.html) to
transform your data.

Cheers, Thomas

Am 20.08.2014 18:26, schrieb Tim Ward t...@telensa.com [firebird-support]:
>  
> 
> You want to be looking around your external CSV file being an "external
> table" - that's the only way to write to files from stored procedures
> AFAIK, so, no matter how convoluted the code ends up, that's probably
> the approach you'll have to take.
> 
> (Unless there's new stuff in 2.5 I don't know about, I've only done this
> with 2.1.)
> 
> On 20/08/2014 17:19, conver...@gmail.com [firebird-support] wrote:
>>  
>>
>> Hi there,
>>
>> As subject, is it possible to export a query result set to an external
>> csv file from a Firebird stored procedure? I know this can be done
>> with IBExpert but we are looking for a pure firebird sql solution. We
>> are using Firebrd 2.5.
>>
>>
>> Any pointers on how to do this will be much appreciated.
>>
>>
>> Regards,
>>
>>
>> -Ed
>>
>>
> 
> 
> -- 
> Tim Ward
> 
> 

-- 
Mit freundlichen Grüßen,

Thomas Beckmann
Diplom-Informatiker


Wielandstraße 14c • 23558 Lübeck
Tel +49 (22 25) 91 34 - 545 • Fax +49 (22 25) 91 34 - 604
Mail thomas.beckm...@assfinet.de 

ASSFINET-Logo

*ASSFINET Dienstleistungs-GmbH*
Max-Planck-Straße 14 • 53501 Grafschaft bei Bonn
i...@assfinet.de  • www.assfinet.de


Geschäftsführer: Dipl. Wirtschaftsinformatiker Marc Rindermann
Registergericht Koblenz HRB 23331

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist
nicht gestattet.