Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

www.webdp.net, Event 9 IIS log failed to write entry, wwwxxx jeffs, Catastrophic failure Unexpected method call sequence. 0x8000ffff (-2147418113)., ksh lock a file, [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed, sed: -e expression #1, char 1: unterminated address regex, procmail + change subject, w2ksp4.exe download, /proc/kallsyms format

Links

XODOX
Impressum

#1: Math.min() in sql?

Posted on 2008-01-29 14:43:43 by Christian Welzel

Hi,

wie schreibt man in (My)SQL sowas wie
UPDATE table SET col = col - min(col,0) WHERE... ?

--
MfG, Christian Welzel aka Gawain@Regenbogen

GPG-Key: http://www.camlann.de/key.asc
Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15

Report this message

#2: Re: Math.min() in sql?

Posted on 2008-01-29 14:55:49 by Christian Kirsch

Christian Welzel schrieb:
> Hi,
>
> wie schreibt man in (My)SQL sowas wie
> UPDATE table SET col = col - min(col,0) WHERE... ?
>

IF?
CASE?

Report this message

#3: Re: Math.min() in sql?

Posted on 2008-01-29 15:13:57 by Christian Welzel

Christian Kirsch wrote:

> IF?

Na gut, nicht schön, aber muss reichen.
Danke!

--
MfG, Christian Welzel aka Gawain@Regenbogen

GPG-Key: http://www.camlann.de/key.asc
Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15

Report this message

#4: Re: Math.min() in sql?

Posted on 2008-01-29 18:37:40 by B.Steinbrink

On Tue, 29 Jan 2008 14:43:43 +0100, Christian Welzel wrote:

> Hi,
>
> wie schreibt man in (My)SQL sowas wie UPDATE table SET col = col -
> min(col,0) WHERE... ?

LEAST(col, 0)

Björn

Report this message