MySQL Forums
Forum List  »  Italian

Problema con if in una select
Posted by: Gemini Gemini
Date: March 04, 2010 09:08AM

Ciao a tutti
ho un'applicazione realizzata in asp.net 1.1 e utilizzo come db mysql 5.0.45
Quando eseguo questa query:
“Select gv.periodo_dal, gv.periodo_al, v.id_comp, v.id_airport, if (v.ora_part=’’ or v.ora_part=’00:00:00’,’00:00’,v.ora_part) as ora_part, v.durata, v.status, v.volo, v.tipo, v.tipo_volo, v.gate, v.stand, v.aereomobile, v.giorno_settimanale, v.ritardo, v.anticipo, v.checkin From gruppo_volo gv Inner Join voli v On gv.id_group=v.id_group Where v.id_group=’1’ Group By v.giorno_settimanale”

ora_part invece di restituire un tipo Time, mi restituisce un tipo di tipo byte e l'applicazione mi da errore. Se elimino 'if(v.ora_part...)' e scrivo direttamente v.ora_part non ho nessun problema.

La cosa strana è che se eseguo un'altra query che contiene l'if non ho nessun problema.

Se eseguo la query che mi da errore nel mysql control center non ho nessun problema. Il problema nasce quando questa viene eseguita nell'applicazione asp.net
Grazie mille

Options: ReplyQuote


Subject
Views
Written By
Posted
Problema con if in una select
5604
March 04, 2010 09:08AM
3040
March 04, 2010 11:26PM


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.