Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B58B4476C5D for ; Thu, 5 Sep 2002 12:59:33 -0400 (EDT) Received: from natura.cebas.csic.es (natura.cebas.csic.es [161.111.146.9]) by postgresql.org (Postfix) with ESMTP id C4FEC476CA4 for ; Thu, 5 Sep 2002 12:58:51 -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 g85Gveo20150 for ; Thu, 5 Sep 2002 18:57:40 +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 g85Gvei20144 for ; Thu, 5 Sep 2002 18:57:40 +0200 Message-Id: <200209051657.g85Gvei20144@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:58:34 +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/26 X-Sequence-Number: 9303 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 -------------------------------------------------------