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--