List:MaxDB« Previous MessageNext Message »
From:Yves Trudeau Date:October 14 2003 7:32pm
Subject:Re: Translate SQL script from MySQL to MaxDB
View as plain text  
Hi,
	have a look at the Decode function.

Yves

Alejandro D. Burne wrote:

>  
> Is there any logical function (IF ????) to translate this sentence???
>  
> SELECT MONTH(MLPL.FechaComprobante) AS Mes, 
> SUM(IF(CLP.DebitoCredito='C',MLPL.Importe,0)) AS Haberes, 
> SUM(IF(CLP.DebitoCredito='D',MLPL.Importe,0)) AS Deducciones, 
> SUM(IF(CLP.CodigoConceptoLiqProf=270,MLPL.Importe,0)) AS InstBecario, 
> SUM(IF(CLP.CodigoConceptoLiqProf=395,MLPL.Importe,0)) AS Ganancias 
> FROM MovimientosLiqProfesionales MLP INNER JOIN 
> MovimientosLiqProfesionalesLiquidados MLPL
> ON MLP.CodigoMovLiqProf=MLPL.CodigoMovLiqProf
> INNER JOIN ConceptosLiqProfesionales CLP
> ON MLP.CodigoConceptoLiqProf=CLP.CodigoConceptoLiqProf 
> WHERE ...
> 		
> 
> _________________________________________________________________
> <http://www.incredimail.com/redir.asp?ad_id=310&lang=10>  IncrediMail - 
> El E-mail ha evolucionado finalmente - Haga clic aquí 
> <http://www.incredimail.com/redir.asp?ad_id=310&lang=10>

-- 
Yves Trudeau, Ph. D.
Analyste système
Tétreau Dumont Trudeau consultants inc.

Thread
Translate SQL script from MySQL to MaxDBAlejandro D. Burne14 Oct
  • Re: Translate SQL script from MySQL to MaxDBYves Trudeau14 Oct
RE: Translate SQL script from MySQL to MaxDBElke Zabach15 Oct
  • Temporary tablesAlejandro D. Burne15 Oct
RE: Temporary tablesHolger Becker15 Oct
RE: Temporary tablesDavid N. Heydon23 Oct