Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F38A19FB298 for ; Wed, 28 Feb 2007 09:02:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 68369-03 for ; Wed, 28 Feb 2007 09:02:24 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id 5BDA89FB1E4 for ; Wed, 28 Feb 2007 09:02:39 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so100012ugf for ; Wed, 28 Feb 2007 05:02:38 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=auYN0ulQG04LAIZhoRjY1aKyZq0ZR8T5WgYVd18ZikH1TphXjhXkgLxUp+c5wCZMIlL7TwsvdSKptV9af7ZEZWbu6FRuuZXMHioZoKIC5suvNEgKWW5stoItJNDxNrNlHTwIa/um7DIUPOHqUyyeVC4KY6Eae8xja05Hw73III0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=IZGLXyz5YRh94aK9FQNdK4cbLEI+i2aeClG/iC0fo1BCjVHy9KG6HXPjn6yS/MNeUFNpi76wRhLvMLfDPFPDF79OoxrDxCpjymEAgMEYzZaPtCOJOjUGnuoBA1v4h0yTtMIJitZ9sl39LpPyQnWztvE531U9rwzcmF2VAAJ5l+I= Received: by 10.67.19.17 with SMTP id w17mr627068ugi.1172667758673; Wed, 28 Feb 2007 05:02:38 -0800 (PST) Received: by 10.67.94.13 with HTTP; Wed, 28 Feb 2007 05:02:38 -0800 (PST) Message-ID: <55c095e90702280502x3673fe6g67e7cb5de714356f@mail.gmail.com> Date: Wed, 28 Feb 2007 10:02:38 -0300 From: "Ezequias Rodrigues da Rocha" To: pgsql-sql@postgresql.org Subject: Case with Char(1) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/291 X-Sequence-Number: 27625 Hi list, it is possible to use case with character (1) ? I am having problems to formate the SQL statement. I have: SELECT * FROM test; a --- A B C SELECT a, CASE WHEN a='A' THEN 'one' WHEN a='B' THEN 'two' ELSE 'other' END FROM test; a | case ---+------- A | one B | two C | other I know from all program languages that case do not apply to noun sequencialiable (if this word exists) variable (like integers etc). Any help would be greatfull. Thanks in advance Ezequias