MySQL Forums
Forum List  »  German

Re: GREATEST / MAX von berechneten Spalten
Posted by: Mark Knochen
Date: April 15, 2012 01:48AM

Update:

es funktioniert mit GREATEST, aber nur, wenn ich die Spaltenbezeichnungen weglassen:

GREATEST(
if(results.L > 0,(results.L * prices.L),0),
if(results.M > 0,(results.M * prices.M),0),
if(results.N > 0,(results.N * prices.N),0)
) AS maxResult

Damit bekomme ich maxResult - klappt. Nur, wie weiss ich jetzt "welches" von den drei Spalten das war?


Danke nochmals

Mark

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.