Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Impresión
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 14-12-2016
elisma22 elisma22 is offline
Registrado
NULL
 
Registrado: may 2015
Posts: 7
Poder: 0
elisma22 Va por buen camino
Perdón el doble post, probé con la función DECODE que recomendaste, pero al parecer no funciona en mysql,pero al investigar encontré la función CASE la cual me funciono de maravillas.
Aquí dejo el código:
Código SQL [-]
select ventas.id_ven,ventas.plazo, descxven.id_prod, descxven.cant, productos.nom_prod,
sum(Descxven.cant ) AS total, 
case (month(ventas.plazo))when 1 then'ENERO' when 2 then'FEBERO' when 3 then'MARZO' 
when 4 then'ABRIL' when 5 then'MAYO' when 6 then'JUNIO' when 7 then'JULIO'
when 8 then'AGOSTO' when 9 then'SEPTIEMBRE' when 10 then'OCTUBRE' when 11 then'NOVIEMBRE'
when 12 then'DICIEMBRE' END as mes
from (ventas inner join descxven on ventas.id_ven=descxven.id_ven)inner join productos
on descxven.id_prod=productos.id_prod 
 GROUP BY Productos.nom_prod, mes order by mes desc, productos.nom_prod
Muchas gracias por tu respuesta, sin ella no hubiera sabido por donde empezar a investigar.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Mostrar texto en lugar de valor (Fastreport) Tecnofacil Impresión 1 07-09-2016 16:21:29
Imprimir texto plano en FastReport Gregorio Cíber Impresión 0 01-06-2012 07:46:49
FastReport RichView ver texto plano gluglu Impresión 0 23-07-2010 18:44:16
Cambiar Camino BD FastReport yokey Impresión 0 09-06-2008 14:41:53
Cambiar tamaño de hoja-FastReport IVAND Impresión 0 26-08-2006 01:23:57


La franja horaria es GMT +2. Ahora son las 19:15:05.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi