Igor Tandetnik wrote:
>
> You don't need SELECT keyword here. You could also get closer to the
> original statement with
>
> UPDATE tableName SET rgt = rgt + (CASE WHEN (rgt < %1) THEN %2 ELSE -%3
> END);
>
This also has the advantage that it is standard SQL and therefore
portable to many ot
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have trouble to move up node on sqlite
> on mysql i write:
> UPDATE SET rgt = rgt + IF(rgt<%1,%2,-%3)
> on sqlite i must rewrite query to
> UPDATE SET rgt = (SELECT CASE WHEN (rgt < %1) THEN rgt + %2 ELSE rgt
> + -%3 END)
You don't ne
I have trouble to move up node on sqlite
on mysql i write:
UPDATE SET rgt = rgt + IF(rgt<%1,%2,-%3)
on sqlite i must rewrite query to
UPDATE SET rgt = (SELECT CASE WHEN (rgt < %1) THEN rgt + %2 ELSE rgt + -%3
END)
is here a way to create a trigger or similar on sqlite to support
IF(expression,int o
3 matches
Mail list logo