From: ivan marchesini <marchesini@unipg.it>
To: Richard Broersma Jr <rabroersma@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: how to solve this problem
Date: Thu, 13 Apr 2006 15:56:36 +0200
Message-ID: <1144936596.5079.36.camel@geologia5.agora.ing.unipg.it> (raw)
In-Reply-To: <20060413135111.78790.qmail@web31811.mail.mud.yahoo.com>
References: <20060413135111.78790.qmail@web31811.mail.mud.yahoo.com>
Sorry, I'm not able to understand how I can use this solution!!!
can you better explain me your suggestion???
Thanks very much
Il giorno gio, 13/04/2006 alle 06.51 -0700, Richard Broersma Jr ha
scritto:
> Just a thought,
>
> Could you achieve that same result using the binary representation of an integer?
>
> Regards,
>
> Richard
>
> --- ivan marchesini <marchesini@unipg.it> wrote:
>
> > Dear users,
> > I have this problem
> >
> > I have a table where there are 20 columns named
> > vinc1, vinc2, vinc3, vinc4, etc....
> >
> > the values contained into each column are simply 1 or 0 (each column is
> > dichotomic)
> > 1 means presence
> > 0 means absence
> >
> > I would obtain a column (new_column) containg the name of the columns,
> > comma separated, where the value is = 1
> >
> > for example:
> >
> > vinc1 vinc2 vinc3 vinc4 new_column
> > 1 0 1 0 vinc1,vinc3
> > 0 0 0 1 vinc4
> > 0 1 1 1 vinc2,vinc3,vinc4
> >
> > can someone help me to find the best way to obtain this result???
> > thank you very much
> >
> > Ivan
> >
> >
> >
> >
> >
> >
> >
> > --
> > Ivan Marchesini
> > Department of Civil and Environmental Engineering
> > University of Perugia
> > Via G. Duranti 93/a
> > 06125
> > Perugia (Italy)
> > e-mail: marchesini@unipg.it
> > ivan.marchesini@gmail.com
> > tel: +39(0)755853760
> > fax: +39(0)755853756
> > jabber: geoivan73@jabber.org
> >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
> >
>
>
--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
jabber: geoivan73@jabber.org
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-sql@postgresql.org
Cc: marchesini@unipg.it, rabroersma@yahoo.com
Subject: Re: how to solve this problem
In-Reply-To: <1144936596.5079.36.camel@geologia5.agora.ing.unipg.it>
References: <20060413135111.78790.qmail@web31811.mail.mud.yahoo.com> <1144936596.5079.36.camel@geologia5.agora.ing.unipg.it>
* 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