In Base query design what’s the SQL syntax for AND
and OR
when connected to MySQL?
Typical usage examples:
Select True And False As `x` From `Foo`;
Select 1=1 And 2=2 As `x` From `Foo`;
Select if(1=1 And 2=2, 5, 6) As `x` From `Foo`;
Select if((1=1) And (2=2), 5, 6) As `x` From `Foo`;
I’ve tried everything I can think of including ...AND(1=1; 2=2)...
, but keep getting a syntax error.
? Also, why is it again that there is this SQL interpretation process that goes on?
BTW, in the Tools | SQL window (uninterpreted) the following work as expected:
SELECT 1=1 And 2=2 As `x` From `Foo`;
SELECT (1=1 And 2=2) As `x` From `Foo`;
SELECT (1=1) And (2=2) As `x` From `Foo`;
SELECT if((1=1) And (2=2),5,6) As `x` From `Foo`;
Also of note is that
SELECT 1=1 As `x` ...
does not work as expected. Instead you must write
SELECT if(1=1,true, false) As `x` ..
Thanks.
Using LO 5.3.3.2