Received: from srv.ctlno.com (216-175-179-80.client.dsl.net [216.175.179.80]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f28Ig0x90605 for ; Thu, 8 Mar 2001 13:42:00 -0500 (EST) (envelope-from matt@ctlno.com) Received: by srv.ctlno.com with Internet Mail Service (5.5.2650.21) id <1LHYVR4T>; Thu, 8 Mar 2001 12:36:23 -0600 Message-ID: <183FA749499ED311B6550000F87E206C1FD049@srv.ctlno.com> From: Matthew To: pgsql-general@postgresql.org Subject: SQL Question Date: Thu, 8 Mar 2001 12:36:22 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain X-Archive-Number: 200103/386 X-Sequence-Number: 5872 I'm trying to do some type of conditional select statement and I have no idea how. What I would like is something like this (using pseudo sql) select (if(col1>1) true else if (col1<= 1) false) from foo; does that make sense? Basically I want one column of my result set to be true or false based on some logic. I can do it in code and have my program handle it, but I was hoping to do it in SQL. Thanks, Matt O'Connor