List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:November 28 2005 7:36pm
Subject:Re: How to use Logic in View Statment?
View as plain text  
Scott

 >select
 >fieldOne,
 >fieldTwo,
 >if(fieldThree.length>0) then fieldThree as Company
 >else fieldFour as Company
 >from table;

SELECT
   fieldOne,
   fieldTwo,
   IF( LENGTH( fieldthree ) > 0, fieldthree, fieldFour ) AS Company
FROM table;

PB

-----

Scott Klarenbach wrote:

>I'd like to do the following in my view
>
>select
>  fieldOne,
>  fieldTwo,
>  if(fieldThree.length>0) then fieldThree as Company
>  else fieldFour as Company
>
>from table;
>
>I realize this syntax isn't correct and length doesn't exists, but is
>this possible?  I've seen it done in SQLServer, but can't remember the
>syntax.
>
>  
>


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.8/184 - Release Date: 11/27/2005

Thread
How to use Logic in View Statment?Scott Klarenbach28 Nov
  • Re: How to use Logic in View Statment?SGreen28 Nov
    • Re: How to use Logic in View Statment?Cory @ SkyVantage28 Nov
      • Re: How to use Logic in View Statment?SGreen28 Nov
    • Re: How to use Logic in View Statment?Martijn Tonies28 Nov
    • Re: How to use Logic in View Statment?Scott Klarenbach5 Dec
      • Re: How to use Logic in View Statment?SGreen5 Dec
  • Re: How to use Logic in View Statment?Peter Brawley28 Nov
RE: How to use Logic in View Statment?Gelu Gogancea28 Nov