Re: Select AND IF
On Wed, 03 Oct 2007 16:18:08 +0200, turnitup <same@same> wrote:
> I want to include an AND clause, but only if a certain criteria is met..
> There are other AND clauses. Pseudo code below
>
> SELECT * from tbl where foo = 1 AND bar = 1 AND IF ( (asas != 1)asas >
> 2 )
>
> Is this possible?
SELECT * from tbl
WHERE foo = 1
AND bar = 1
AND (asas = 1
OR asas > 2)
--
Rik Wasmus
|