From sgnerd@yahoo.com.sg Tue Apr 27 06:12:38 2004 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 82D4FD1B897 for ; Tue, 27 Apr 2004 03:12:38 -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 30791-02 for ; Tue, 27 Apr 2004 03:12:38 -0300 (ADT) Received: from chn-dns.primus-india.net (chn-dns.primus-india.net [203.196.153.7]) by svr1.postgresql.org (Postfix) with ESMTP id 1BC1BD1B8DE for ; Tue, 27 Apr 2004 03:12:35 -0300 (ADT) Received: from ivesia67 (ptil-138-190-chn.primus-india.net [203.196.190.138] (may be forged)) by chn-dns.primus-india.net (8.12.8/8.12.8) with SMTP id i3R58ttj005457 for ; Tue, 27 Apr 2004 10:38:56 +0530 Message-ID: <008801c42c1e$b70efbb0$7502a8c0@hdsc.com> From: "kumar" To: "pgsql" Subject: Logical comparison on Strings Date: Tue, 27 Apr 2004 02:13:08 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0085_01C42BFD.2E8E3B50" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=HTML_50_60, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200404/291 X-Sequence-Number: 17666 This is a multi-part message in MIME format. ------=_NextPart_000_0085_01C42BFD.2E8E3B50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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'.=20 I want to compare like AND and OR operators.=20 C1 AND C2 should give result like NNYNY. C1 OR C2 should give result like YNYYY. Please shed some light. Thanks Kumar ------=_NextPart_000_0085_01C42BFD.2E8E3B50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear Friends,
 
Postgres 7.3.2 on Linux 7.
 
I want to compare to columns and get the l= ogical=20 result as follows.
 
C1 is 'YNYNY' . C2 is 'NNYYY'.
 
I want to compare like AND and OR operator= s.=20
 
C1 AND C2 should give result like=20 NNYNY.
C1 OR C2 should give result like=20 YNYYY.
 
Please shed some light.
 
Thanks
Kumar
------=_NextPart_000_0085_01C42BFD.2E8E3B50-- From mallah@trade-india.com Tue Apr 27 10:14:04 2004 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