MySQL Forums
Forum List  »  German

komplizierte SUM Abfrage
Posted by: not known
Date: April 17, 2009 10:04AM

Hallo Forumgemeinde,

ich bin SQL-Einsteiger und bastele gerade an einer SUM-Abfrage.
Folgendes Problem:

Wenn die Abfrage

"SELECT SUM(acctsessiontime) FROM radacct WHERE username='%{%k}'"

den Wert "NULL" zurückgibt, dann soll als "Antwort" der Wert "0,01" ausgegeben werden. Falls das Ergebnis nicht "NULL" ist dann soll die Antwort den tatsächlichen Wert enthalten.

Ich hoffe das ist möglich und bedanke mich schon jetzt für die Antworten.

Gruß Christian

Options: ReplyQuote


Subject
Views
Written By
Posted
komplizierte SUM Abfrage
4003
April 17, 2009 10:04AM
2232
April 17, 2009 10:38AM


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.