Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF, 078274121, info0a ip, should prodicers of software_based services be held liable or not liable for economic injuries

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