pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Wagner <thewand@web.de>
To: M Sarwar <sarwarmd02@outlook.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: From CROSSTAB: One Column data with Two results columns
Date: Mon, 15 Apr 2024 11:03:41 +0200
Message-ID: <eabe02b475c34361babc34d986aef1f76bbfa7ba.camel@web.de> (raw)
In-Reply-To: <DM4PR19MB59788EAD138EA457D4FE6A9BD30A2@DM4PR19MB5978.namprd19.prod.outlook.com>
References: <PH2P110MB0922542FEBDBD433903505A9FF0AA@PH2P110MB0922.NAMP110.PROD.OUTLOOK.COM>
	<DM4PR19MB59785E2044FF7F30410FDAABD30A2@DM4PR19MB5978.namprd19.prod.outlook.com>
	<DM4PR19MB5978E1148EDA0DB8AA8DED7ED30A2@DM4PR19MB5978.namprd19.prod.outlook.com>
	<DM4PR19MB59788EAD138EA457D4FE6A9BD30A2@DM4PR19MB5978.namprd19.prod.outlook.com>

Hello!

Am Sonntag, dem 14.04.2024 um 20:54 +0000 schrieb M Sarwar:
> Hi,
> I am working CROSSTAB functionality to generate the reports in the
> CSV format.
>  
> Now I have stage where I need to generate 2 result sets  for the same
> 1 column data.

Something like "CREATE VIEW"? The documentation has some useful
examples: https://www.postgresql.org/docs/current/sql-createview.html

"CREATE PROCEDURE" and "CREATE FUNCTION" are rarely covered by
tutorials, so I mention them. They can be used in a similar manner.


For CSV, I'm the wrong person. I'd code it in C/C++.

Regards,
Andreas Wagner





view thread (7+ messages)  latest in thread

Message-ID: <eabe02b475c34361babc34d986aef1f76bbfa7ba.camel@web.de>
Permalink:  ../eabe02b475c34361babc34d986aef1f76bbfa7ba.camel@web.de/
Also on:    postgresql.org/message-id/eabe02b475c34361babc34d986aef1f76bbfa7ba.camel@web.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: thewand@web.de, sarwarmd02@outlook.com, pgsql-admin@lists.postgresql.org
  Subject: Re: From CROSSTAB: One Column data with Two results columns
  In-Reply-To: <eabe02b475c34361babc34d986aef1f76bbfa7ba.camel@web.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox