Hi, I am migrating my PC software to android system. However, it gives syntax error when executing if statement? Does ultralite support if-statement in query? or is there any equivalent to it?
Ultralite does not support any procedural language including stored procedures or functions or triggers, so there is no support for, nor need of, if statements.
But if you are wanting to use an "if" within an expression then, yes, Ultralite supports if expressions. The basic syntax of an if expression is:
IF search-condition THEN expression1 [ ELSE expression2 ] ENDIF
select IF @foo = @bar THEN 1 ELSE 0 ENDIF as X from T
See the documentation for more information.
answered 28 May '13, 21:31