Re: How to include an IF() statement in SQL?

From: <nasof_at_hotmail.com>
Date: 1998/09/02
Message-ID: <6sju2o$vo8$1_at_nnrp1.dejanews.com>#1/1


Try:

SELECT DECODE(custid, parentid, '', name) parent_name FROM customers;

In article <35EC91AF.40041E9D_at_headroom.com>,   Troy Perchotte <max_at_headroom.com> wrote:
> How do I include a condition within a select statement?
> Something like the following (only one that works):
>
> select if(customers.custid=customers.parentid,'',customers.name) as
> parent_name from customers;
>
> Troy Perchotte
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Wed Sep 02 1998 - 00:00:00 CEST

Original text of this message