On Tue, Aug 21, 2001 at 10:25:35AM +0200, Tony Grant wrote:
> 
> > > For example, say I've got a postgresql database of client information
> > > (names, addresses, etc.), and I want to use this information to generate
> > > envelopes for mailouts.  As far as my understanding goes, such
> > > functionality is not provided by postgresql itself.
> 
> I have the same problem but I need a guide on JDBC serialization. I
> would like to put a button on a JSP that will save the result of a query
> to local disk as a tab delimited file.
> 
> That will permit me to open it in AppleWorks for mailing label printing.
> 
> Any pointers greatly appreciated

db=# \h copy
Command:     COPY
Description: Copies data between files and tables
Syntax:
COPY [ BINARY ] table [ WITH OIDS ]
    FROM { 'filename' | stdin }
    [ [USING] DELIMITERS 'delimiter' ]
    [ WITH NULL AS 'null string' ]
COPY [ BINARY ] table [ WITH OIDS ]
    TO { 'filename' | stdout }
    [ [USING] DELIMITERS 'delimiter' ]
    [ WITH NULL AS 'null string' ]

db=# copy someTable to '/path/to/file.tsv';

now read tab-separated file "file.tsv" into the program of your
choice.

or use "practical extraction and reporting language" to generate
your reports (perl!)...

-- 
Khan said that revenge is a dish best served cold. I think 
sometimes it's best served hot, chunky, and foaming. 
        - P.J.Lee ('79-'80)
 
[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to