List:General Discussion« Previous MessageNext Message »
From:hsv Date:February 2 2013 4:18am
Subject:Re: Complex MySQL Select Statement Help
View as plain text  
>>>> 2013/01/31 22:24 -0600, Peter Brawley >>>>
Is this what you mean?

Select,
pricelist
If( !IsNull(specialprice) And specialprice < unitprice And CurDate() Between
startingDate And endingDate,
specialprice,
unitprice
) as used_price
From catalog
Where itemid='WB314';

PB 
<<<<<<<<
Maybe this is gilding the lily, but if "specialprice" is null, then
specialprice < unitprice
is not true--and maybe if the null-test is left out it is less clear.... 

Thread
Complex MySQL Select Statement HelpAngela Barone1 Feb
  • Re: Complex MySQL Select Statement HelpPeter Brawley1 Feb
    • Re: Complex MySQL Select Statement HelpAngela Barone1 Feb
    • Re: Complex MySQL Select Statement Helphsv2 Feb
      • Re: Complex MySQL Select Statement HelpPeter Brawley2 Feb
        • Re: Complex MySQL Select Statement Helphsv3 Feb