Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C0892476C27 for ; Thu, 5 Sep 2002 12:54:00 -0400 (EDT) Received: from natura.cebas.csic.es (natura.cebas.csic.es [161.111.146.9]) by postgresql.org (Postfix) with ESMTP id F3E81476BC6 for ; Thu, 5 Sep 2002 12:53:58 -0400 (EDT) Received: from natura.cebas.csic.es (localhost.localdomain [127.0.0.1]) by natura.cebas.csic.es (8.11.6/8.11.6) with ESMTP id g85Gqko20112 for ; Thu, 5 Sep 2002 18:52:46 +0200 Received: from there (equipo97.cebas.csic.es [161.111.146.97]) by natura.cebas.csic.es (8.11.6/8.11.6) with SMTP id g85Gqki20106 for ; Thu, 5 Sep 2002 18:52:46 +0200 Message-Id: <200209051652.g85Gqki20106@natura.cebas.csic.es> Content-Type: text/plain; charset="iso-8859-15" From: andres javier garcia garcia To: pgsql-sql@postgresql.org Subject: new calculated column Date: Thu, 5 Sep 2002 18:53:40 +0200 X-Mailer: KMail [version 1.3.2] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/39 X-Sequence-Number: 9316 Hi; I've got a table with two fields and about 3000 rows, the second one is a character field, what can have about twenty different values; of course these values are repeated a lot of times in the table. I need to create a new column of type integer, whose value depens on the character fields. The values of the new column are not important, the important thing is who can I create this column and assign a different integer to a different char value in the other column. Thanks -------------- Javier