X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AC7B0D1B50C for ; Tue, 27 Apr 2004 07:14:04 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 15935-01 for ; Tue, 27 Apr 2004 07:14:04 -0300 (ADT) Received: from trade-india.com (unknown [61.16.154.82]) by svr1.postgresql.org (Postfix) with SMTP id 66D12D1B478 for ; Tue, 27 Apr 2004 07:13:58 -0300 (ADT) Received: (qmail 24355 invoked from network); 27 Apr 2004 10:02:34 -0000 Received: from valium.trade-india-local.com (HELO trade-india.com) (192.168.0.72) by system66.trade-india-local.com with SMTP; 27 Apr 2004 10:02:34 -0000 Message-ID: <408E32E2.1030709@trade-india.com> Date: Tue, 27 Apr 2004 15:46:02 +0530 From: Rajesh Kumar Mallah Organization: Infocom Network Limited User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: kumar Cc: pgsql Subject: Re: Logical comparison on Strings References: <008801c42c1e$b70efbb0$7502a8c0@hdsc.com> In-Reply-To: <008801c42c1e$b70efbb0$7502a8c0@hdsc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/295 X-Sequence-Number: 17670 kumar wrote: > Dear Friends, > > Postgres 7.3.2 on Linux 7. > > I want to compare to columns and get the logical result as follows. > > C1 is 'YNYNY' . C2 is 'NNYYY'. > > I want to compare like AND and OR operators. > > C1 AND C2 should give result like NNYNY. > C1 OR C2 should give result like YNYYY. Bit String Types in PostgreSQL may be what you are looking for. btw: what is linux 7? > > Please shed some light. > > Thanks > Kumar