Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

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?


asked 28 May '13, 18:13

Peng84's gravatar image

accept rate: 0%

edited 28 May '13, 21:51

Mark%20Culp's gravatar image

Mark Culp

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 ]


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
accept rate: 41%

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 28 May '13, 18:13

question was seen: 2,311 times

last updated: 29 May '13, 09:21