The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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?

Thanks

asked 28 May '13, 18:13

Peng84's gravatar image

Peng84
66337
accept rate: 0%

edited 28 May '13, 21:51

Mark%20Culp's gravatar image

Mark Culp
22.3k9129262


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

Example:

select IF @foo = @bar THEN 1 ELSE 0 ENDIF as X from T

See the documentation for more information.

permanent link

answered 28 May '13, 21:31

Mark%20Culp's gravatar image

Mark Culp
22.3k9129262
accept rate: 40%

Thank you!

(29 May '13, 09:15) Peng84
Replies hidden

If that answer has helped you, you're invited to mark it as accepted - cf. How do I accept an answer to my question?

(29 May '13, 09:21) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×404
×128
×7

question asked: 28 May '13, 18:13

question was seen: 769 times

last updated: 29 May '13, 09:21