From: Alexander Burbello <burbello3000@yahoo.com.br>
To: Lista Postgres <pgsql-admin@postgresql.org>
Subject: Build an statement
Date: Tue, 10 Oct 2006 14:37:15 -0300
Message-ID: <452BDA4B.5030706@yahoo.com.br> (raw)
Hi people,
I am begginer on Postgres, and I would like to build a report this way:
1 - Central
101 - Base Rio
1001 - Sing X
1002 - Sing Y
1003 - Sing Z
102 - Base Sao Paulo
1004 - Sing A
1004 - Sing A
1004 - Sing A
In my table, I have the following data:
coo_cod_cooperative coo_cooperative_up coo_type coo_name
---------------------- ---------------------------
----------- --------------------
1001 100
3 Singular X
1002 100
3 Singular Y
1003 100
3 Singular Z
100 1
2 Base Sao Paulo
101 1
2 Base Rio de Janeiro
1004 101
3 Singular A
1005 101
3 Singular B
1006 101
3 Singular C
1 (null)
1 Central
COO_TYPE means: 1 master; 2 - regional; 3 - offices
I would like to do this statement independent the code, based on type.
Is it possible to do on Postgres?
Thanks in advance.
Alexander
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: burbello3000@yahoo.com.br
Subject: Re: Build an statement
In-Reply-To: <452BDA4B.5030706@yahoo.com.br>
References: <452BDA4B.5030706@yahoo.com.br>
* 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