MySQL Forums
Forum List  »  Italian

Re: SELECT IF su più righe
Posted by: max dix
Date: January 14, 2008 06:01AM

il problema sembra veramente semplice, pero non è chiaro se i campi su cui fai il controllo appartengono alla stessa tabella.
se appartengono non è comprensibile il 'tipo' di controllo che desideri fare: cioè vuoi che in caso di somma =0 non compaiano nella select o vuoi semplicemente impostare dei valori di controllo???

select
if((campo1+campo2*....)>0,'ok','nonok') chk from mytable
having chk ='ok'

spiegati meglio.

Options: ReplyQuote


Subject
Views
Written By
Posted
13922
January 03, 2008 04:30AM
Re: SELECT IF su più righe
6515
January 14, 2008 06:01AM


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.