no such function: if in SQLite

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mohsen24000
Posts: 2
Joined: Thu 09 Jun 2011 10:48

no such function: if in SQLite

Post by mohsen24000 » Fri 18 May 2012 18:05

hi dears.
why does not work 'IF' keyword in SQLite Queries on TUniQuery!?

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: no such function: if in SQLite

Post by ZEuS » Mon 21 May 2012 07:20

Hello.

There is no IF-THEN-ELSE implementation in SQLite.
You should use the CASE expression instead of IF.
You can find more information about the CASE expression in the official SQLite documentation here: http://www.sqlite.org/lang_expr.html#case

mohsen24000
Posts: 2
Joined: Thu 09 Jun 2011 10:48

Re: no such function: if in SQLite

Post by mohsen24000 » Thu 24 May 2012 15:06

thanx!
it is worked...
but in some applications such as SQLite2009 Pro, in query statements "IF" keyword does work!

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: no such function: if in SQLite

Post by ZEuS » Fri 25 May 2012 08:52

The point is that SQLite2009 Pro uses a specially built SQLite client library with many additional features provided. The official version of the client library that is available on the SQLite site, doesn't provide such functionality.

Post Reply